in reply to (bbfu) Re: QuickPerl: a step up from -e
in thread QuickPerl: a step up from -e

How about doing a fork ... That is, of course, instead of doing the system call.

How do you think system is actually implemented? Under UNIX, system *is* doing a fork and an exec. Under Windows, there's no native fork, but the principle remains the same: what you are replacing system with is just what system is already doing.

-- Abigail

Replies are listed 'Best First'.
(bbfu) Re2: QuickPerl: a step up from -e
by bbfu (Curate) on Jul 05, 2001 at 07:51 UTC

    Yes, I'm aware that's how system is implemented. My point was more of doing the STDERR redirect after the fork but before the exec so that it wasn't changed for the parent. It seems, however, that John is using windows which doesn't support fork properly, so it's kind of pointless. :-) So I guess you would just have to redirect STDERR, do the system call, and then restore STDERR. *shrug*

    Update: See my other reply.

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.