Lines Matching +full:linux +full:- +full:no +full:- +full:asm
1 /* ulimit.c - Modify resource limits
8 * Deviations from posix: The units on -f are supposed to be 512 byte
9 * "blocks" (no other options are specified, and even hard drives don't
13 * Deviations from bash: Sizes are in bytes (instead of -p 512 and -f 1024).
14 * Bash's -p value has been wrong since 2010 (git 35f3d14dbbc5).
15 * The kernel implementation of RLIMIT_LOCKS (-x) was removed from Linux in
16 * 2003. Bash never implemented -b (it's in the help but unrecognized at
17 * runtime). We support -P to affect processes other than us.
19 USE_ULIMIT(NEWTOY(ulimit, ">1P#<1SHavutsrRqpnmlifedc[-SH][!apvutsrRqnmlifedc]", TOYFLAG_USR|TOYFLAG…
27 usage: ulimit [-P PID] [-SHRacdefilmnpqrstuv] [LIMIT]
29 Print or set resource limits for process number PID. If no LIMIT specified
30 (or read-only -ap selected) display current value (sizes in bytes).
31 Default is ulimit -P $PPID -Sf" (show soft filesize of your shell).
33 -S Set/show soft limit -H Set/show hard (maximum) limit
34 -a Show all limits -c Core file size
35 -d Process data segment -e Max scheduling priority
36 -f Output file size -i Pending signal count
37 -l Locked memory -m Resident Set Size
38 -n Number of open files -p Pipe buffer
39 -q Posix message queue -r Max Real-time priority
40 -R Realtime latency (usec) -s Stack size
41 -t Total CPU time (in seconds) -u Maximum processes (under this UID)
42 -v Virtual memory size -P PID to affect (default $PPID)
52 // This is a linux kernel syscall added in 2.6.36 (git c022a0acad53) which
57 // I'd like to sort the RLIMIT values 0-15, but mips, alpha and sparc
58 // override the asm-generic values for 5-9. Also, the kernel implementation
59 // of RLIMIT_LOCKS (-x) was removed from Linux in 2003.
70 if (!(toys.optflags&(FLAG_H-1))) toys.optflags |= FLAG_f; in ulimit_main()
71 if ((FLAG(a)||FLAG(p)) && toys.optc) error_exit("can't set -ap"); in ulimit_main()
81 if (get && prlimit(TT.P, map[i], 0, &rr)) perror_exit("-%c", flags[i]); in ulimit_main()
83 if (FLAG(a)) printf("-%c: ", flags[i]); in ulimit_main()
87 xreadfile("/proc/sys/fs/pipe-max-size", toybuf, sizeof(toybuf)); in ulimit_main()