http://www.perlmonks.org?node_id=905476


in reply to Sz command hanging and outputting ZNAK’s

You could use IPC::Open3 (saving the child pid it returns) to run the command and read its output from filehandles. Then if you don't like what it is doing on that basis, closing the filehandles will terminate the child and the parent can waitpid the pid of the child before iterating the next remote device cleanly.

One world, one people

  • Comment on Re: Sz command hanging and outputting ZNAK’s