The problem would appear to be that you spawned a child, told it to go away and do something and then neglected to hang around waiting for your child to finish e.g.
. . } else { # parent print "forked child \$pid= $pid\n"; wait(); # Added exit 0; } . .
In reply to Re: Exec command running in background after a fork
by Bloodnok
in thread Exec command running in background after a fork
by eduardoll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |