http://qs1969.pair.com?node_id=1133444

kamrul has asked for the wisdom of the Perl Monks concerning the following question:

My code is like below:
my @threads = (); $SIG{'TERM'} = sub { foreach(@threads){ $_->join(); } }; push @threads, threads->create(proc1); push @threads, threads->create(proc2);
On TERM signal im trying to wait till all threads are ended. However, whenever I pass TERM signal my program gets terminated with an error "Segmentation fault" How to fix this ?