|
|
| P is for Practical | |
| PerlMonks |
Re: best way to kill a spawned processby tobyink (Prior) |
| on Feb 05, 2013 at 16:47 UTC ( #1017218=note: print w/ replies, xml ) | Need Help?? |
|
The fork plus exec combination allows you to cleanly launch a background process, and gives you the PID for the background process, which can later be passed to kill.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||