Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Need Function for Timing out shell commands

by cdarke (Prior)
on Sep 15, 2011 at 07:40 UTC ( #926088=note: print w/replies, xml ) Need Help??

in reply to Need Function for Timing out shell commands

I need the return value from the shell programm

You cannot use return from a main program, exit should be used instead (did you use warnings and strict?). Problem with exit though is that you can only return a number (between 0..255), not text. If you must return text:

Replace return $status with print $status
In the shell (Bash or Korn):
/home/fred$ result=$(perl /home/fred$ echo $result Timeout

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://926088]
[Corion]: Weird - this "Install our backdoor SDK" spam is persistent. And I get the feeling it's not even automated, as it seems to be a re-forward of each mail, maybe even manually. Ah well, a quick rule in Thunderbird will move them to Spam automatically now :D
[Corion]: (the "backdoor SDK" is for distributing my software with an included backdoor, not for backdooring my own machine)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-05-25 13:57 GMT
Find Nodes?
    Voting Booth?