On old SystemV Unix using the "truss" program(is similar to strace)
truss script.sh
.....
fork() = 382
6
Received signal #18, SIGCLD, in waitsys() [default]
siginfo: SIGCLD CLD_EXITED pid=382 uid=0 status=0x0000
.....
In the long output I can see the fork() syscall. I want to see the same thing(or similar) on Linux using strace.
I have tried
strace -e fork sh script.sh
and
strace -f sh script.sh
and
strace -f -e fork sh script.sh
But I cannot see the fork(). Linux and Old SystemV are of course different OS, and probably Unix use fork() in a different way from Linux, but the question is: how to see the fork() output using strace? Of course script.sh contain the same command "ls|wc -l" in both systems, I use it only for test.