Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need to be able to kill a system call if it does not return within a reasonable time. I can set a signal alarm to let me know how much time has passed but I need the pid of the system call in order to kill it. I am also using backticks to capture the output. Any ideas. I am sending lpq systems calls to retrieve info through the web but if they do not return or they hang they cause problems.

Replies are listed 'Best First'.
•Re: kill system() call
by merlyn (Sage) on Aug 01, 2002 at 23:27 UTC
      What's with the •?

      T I M T O W T D I
        There's an option to have a default thing to prepend your message topics with. merlyn has • in his which used to become • but is broken now.

        -- MrNobo1024
        s]]HrLfbfe|EbBibmv]e|s}w}ciZx^RYhL}e^print

Re: kill system() call
by Cine (Friar) on Aug 01, 2002 at 23:24 UTC
    Use 'open' to create a pipe to your system call. 'open' will return the pid of the spawned process.

    T I M T O W T D I