in reply to Re: Execute shell command, grab it's return, terminate on timeout
in thread Execute shell command, grab it's return, terminate on timeout

Hi Miller, Thanks for the suggestions.

1) It's probably left over from days of developing in C for Atmel MicroControllers. Limited memory partly means declaring as few as possible variables. Probably not so much an issue with my servers having >16Gb RAM.

2) No excuse for that one. Uhhh ... made sense at the time? :o)

3) I've made this change in my live code, though I'm not sure what circumstances would call it, as the other fails get reported via:

push(@return_val, $? >> 8);

The STDOUT data is already in @return_val (or @cmd), and the command above will give me the spawned process' exit code.

  • Comment on Re^2: Execute shell command, grab it's return, terminate on timeout
  • Download Code