Thanks for your reply.
Actually, They are done printing all they have to. "Done! pid = 0" is the last statement before exit(0) for the child.
I'm not sure.. what is stoping from exiting
Parent forked child # ===> 0, pid = 6382
Parent forked child # ===> 1, pid = 6383
Parent forked child # ===> 2, pid = 6384
started all children 2
Argument "CHLD" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/POSIX.pm line 38.
Child 0 in sched
This is Msg1
Done! pid = 0
Argument "CHLD" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/POSIX.pm line 38.
Argument "CHLD" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/POSIX.pm line 38.
Child 0 in sched
This is Msg3
Done! pid = 0
Child 0 in sched
This is Msg2
Done! pid = 0
Argument "CHLD" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/POSIX.pm line 38.
Process 6384 exited
When I do ps -ef, I can see the parent and 2 of its children hanging. Not sure what to make of that.
/opt/jyo/ > ps -ef | grep perl
root 6381 4559 98 15:15 pts/0 00:11:56 perl jfork.pl
root 6382 6381 0 15:15 pts/0 00:00:00
perl <defunct>
root 6383 6381 0 15:15 pts/0 00:00:00
perl <defunct>