Reputation: 1597
when I trace output of the of nice.sh script with strace, I see tons of child processes.
strace -ff -o nice.o ./nice.sh
nice.sh
#!/bin/bash
while /usr/bin/[ 1 ]
do
echo ..;
done;
On the other hand if I run the script below, I do not see any forked child process:
#!/bin/bash
while [ 1 ]
do
echo ..;
done;
The same is also true for echo, /bin/echo and printf, /usr/bin/printf. Does it mean that some commands are embedded into bash? If yes, what are the other commands?
Upvotes: 1
Views: 179