summary refs log tree commit diff
path: root/src/mkinit.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-05-12 18:09:24 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2007-05-12 18:09:24 +1000
commitce0f1900d869066e52a33d58f399c6a9d7ae659d (patch)
treedff08e5aecd39e5b9b4b4a7edd642d565cf7f09b /src/mkinit.c
parent[REDIR] Remove redundant CLOEXEC calls (diff)
downloaddash-ce0f1900d869066e52a33d58f399c6a9d7ae659d.tar.gz
dash-ce0f1900d869066e52a33d58f399c6a9d7ae659d.zip
[REDIR] Fix redirect restore on saved file descriptors
As it stands if a redirection occurs on a file descriptor that was
previously closed, it won't be closed after that redirection goes
out of effect.  This is because we don't keep track of closed file
descriptors properly as we do for open ones.

This patch fixes this by introducing two new states, CLOSED and
REALLY_CLOSED.  The first represents an initially closed descriptor
which is now open while the second one represents an initally closed
descriptor which is now closed.

This patch is based on work by Rainer Weikusat.
Diffstat (limited to 'src/mkinit.c')
0 files changed, 0 insertions, 0 deletions