> 1. Save the PID of the child process.  I'm sure there's a way to do
> this...
>
The fork function returns the PID of the child process to the parent
process, or 0 to the child process.

> >Whats the best way in perl to run an external command and if while
executing
> >the command I hit ctrl + c it will just cancle the external command and
contin
> >ue on with the script instead of bailing out of everything?
>
>
> Well, that's kind of tough.  You probably want a system command to exec an
> external command, but in order to deal with ctrl+c, you'll have to trap
the
> key sequence yourself, and deal with it elsewhere in your code.

Forking is kinda rough to deal with in Perl - with the system function,
however, the ctrl-c will be interpreted by the child first, thus exiting
the child process and sending you back to the parent. (I think, haven't
tested).

-Jamie Blondin


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to