At 2005-01-12T14:44:59+1300, Matthew Gregan wrote:
> Process A:
> close(STDERR_FILENO);
> execl("/path/to/other/processb", "processb", (const char *)0);
> Which then becomes Process B, and does:
> open("/path/to/desired/stderr.log", O_WRONLY);
I forgot to mention that I'm aware this particular case can still be
handled by Process B using dup2(). As I said, it's not particularly
imaginative... I can't think of a _good_ example where dup2() can't be
used off the top of my head, but I have a feeling that there may be at
least one good case to serve as an example--if I remember it, I'll post
it.
> Process A would is then forced to prepare the file descriptors before
Oops; s/would //
Cheers,
-mjg
--
Matthew Gregan |/
/| [EMAIL PROTECTED]