kamrul has asked for the wisdom of the Perl Monks concerning the following question:
My code is like below:
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 ?my @threads = (); $SIG{'TERM'} = sub { foreach(@threads){ $_->join(); } }; push @threads, threads->create(proc1); push @threads, threads->create(proc2);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl how to join all threads
by BrowserUk (Patriarch) on Jul 06, 2015 at 21:40 UTC | |
Re: Perl how to join all threads
by Anonymous Monk on Jul 06, 2015 at 21:27 UTC | |
by kamrul (Acolyte) on Jul 06, 2015 at 21:52 UTC | |
by BrowserUk (Patriarch) on Jul 06, 2015 at 22:14 UTC | |
Re: Perl how to join all threads
by sundialsvc4 (Abbot) on Jul 07, 2015 at 17:39 UTC |
Back to
Seekers of Perl Wisdom