in reply to Re: return value from system call, exit status, shift right 8, bitwise and, $?
in thread return value from system call, exit status, shift right 8, bitwise and, $?

Therefore, system() can return -1 when system() successfully started the command.

Yes. It could mean it was unsuccessful in reaping the child. However, that will only happen when $SIG{CHLD} is overridden, and you shouldn't be using system when you do that.

  • Comment on Re^2: return value from system call, exit status, shift right 8, bitwise and, $?
  • Download Code