Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Killing a shell script from within a perl script

by strider88 (Initiate)
on Mar 09, 2010 at 21:58 UTC ( [id://827631]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Killing a shell script from within a perl script
in thread Killing a shell script from within a perl script

I too am wondering the same. Meanwhile, I tried executing the following line of code on shell, and it worked:

perl -e 'alarm shift @ARGV; exec @ARGV' 100 ./sh1.sh
But I am not able to run this command from my perl script using the system function, within the while loop. That is weird! Any idea why this would happen? Also, the above command does not kill the process, it just suspends it. Is there a way to kill it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://827631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found