4 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl ... use threads; .... my($thr) = threads->new(\&showpic); .... sub showpic { system "eog $picfilename"; }
Can't locate auto/threads/kill.al in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at <snip>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use strict; use warnings; [...] my $pid = fork; die "Failed to fork: $!\n" unless (defined $pid); unless ($pid) { exec '/path/to/program', 'argument'; die "Failed to exec: $!\n"; } [...] { local $SIG{CHLD} = 'IGNORE'; kill TERM => $pid or die "Failed to kill $pid: $!\n"; }
4 Einträge, 1 Seite |