in reply to Re^7: How to make `system` not ignore SIG INT in Perl?
in thread How to make `system` not ignore SIG INT in Perl?

Is there a way to work around so that my provided script can terminate when pressing ^C?

Or do something similar in another way?

  • Comment on Re^8: How to make `system` not ignore SIG INT in Perl?

Replies are listed 'Best First'.
Re^9: How to make `system` not ignore SIG INT in Perl?
by ikegami (Patriarch) on Sep 13, 2011 at 09:05 UTC
    There are many tool to launch processes. IPC::Open3 should do it.
    open(local *CHILD_STDIN, '<', '/dev/null') or die $!; my $pid = open3( '<CHILD_STDIN', # Closed by open3 '>STDOUT', '>STDERR', ... ); waitpid($pid, 0);