[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: protecting shell fds
- To: John (For the colours are many, but the light is one.) Mackin <john@ civil.su.oz.au>
- Subject: Re: protecting shell fds
- From: Paul Haahr <haahr@mv.us.adobe.com>
- Date: Wed, 21 Oct 1992 18:40:52 -0400
- Cc: es mailing list <es@hawkwind.utcs.toronto.edu>
> It does have one disadvantage which to my mind is quite serious:
> namely, it makes it impossible (well, very very hard) to execute builtins
> with redirections unless you fork. This is really, really terrible. In
> fact, it is a bug.
i'm not sure it's a bug, but it does run counter to some expectations.
> [mention from a surprising place of how csh does things well :-)]
what Byron and i have discussed doing is storing up redirections in the fds
that open returns until after the fork, when the remapping would happen.
writes (and maybe reads) go through an extra level of indirection to figure
out what fd they're supposed to affect. this is all pretty simple to do
and doesn't have to be slow. how it interacts with exceptions is still a
question.
fixed in 0.75, unless there's a gotcha we haven't foreseen.
ps: expect 0.75 early next week