| Connie 2007-01-24, 7:19 pm |
| Hi Jens,
Thank you very much for your reply. I heard that PERL by deafult sets
close-on-exec for all descriptors except
STDIN STDOUT and STDERR. If that is true, I shouldn't worry about the
inherit handles since I use perl(Although I like C better.;-)
Thanks
-Connie
On Jan 24, 2:14 pm, j...@toerring.de (Jens Thoms Toerring) wrote:
> Connie <yecon...@gmail.com> wrote:
> exec()ing a shell that in turn tries to start the program
> specified as the argument of system).
>
> to safe-guard against possible problems resulting from the child
> process inheriting open files is to set the close-on-exec flag
> for all files the parent has open.
>
> If you need that it's probably better to use fork/exec instead of
> system().
> Regards, Jens
> --
> \ Jens Thoms Toerring ___ j...@toerring.de
> \__________________________ http://toerring.de
|