我正在运行一个shell脚本,而后者又调用了很多系统命令。 该命令返回错误:
无法分叉 - 再试一次。
这是strace:
fcntl(1, F_DUPFD, 10) = 15
close(1) = 0
fcntl(15, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_DUPFD, 10) = 16
close(3) = 0
fcntl(16, F_SETFD, FD_CLOEXEC) = 0
dup2(16, 1) = 1
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
fork() = 23067
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
dup2(15, 0+ id
) = 0
close(15) = 0
close(16) = 0
dup2(14, 1) = 1
close(14) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
fork() = -1 EPERM (Operation not permitted)
kill(23067, SIGKILL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
ulimit命令的输出是:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 515646
max locked memory (kbytes, -l) 1024
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 32656
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited