summary refs log tree commit diff
path: root/debian/ash.postinst
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-01-18 13:01:18 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-25 12:52:12 +0800
commit48875c1201930d1e71d358eb1cf3eacc166795be (patch)
tree999c367b70ef908863c937944a206fb8b3cdcf7b /debian/ash.postinst
parentoutput: Fix clang warnings about GNU old-style field designator (diff)
downloaddash-48875c1201930d1e71d358eb1cf3eacc166795be.tar.gz
dash-48875c1201930d1e71d358eb1cf3eacc166795be.zip
redir: Handle nested exec within REALLY_CLOSED redirection
The value of REALLY_CLOSED is used to avoid an unnecessary close(2)
call when restoring redirections.  However, as it stands it can
remove a close(2) call that's actually needed.  This happens when
an enclosed exec(1) command leaves an open file descriptor behind.

This patch fixes this by replacing REALLY_CLOSED with closed_redirs
to track the current status of redirected file descriptors and
leaving redirlist to only handle the previous state of redirected
file descriptors.

Reported-by: Martijn Dekker <martijn@inlv.org>
Fixes: ce0f1900d869 ("[REDIR] Fix redirect restore on saved file...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'debian/ash.postinst')
0 files changed, 0 insertions, 0 deletions
:05 -0500'>2018-11-11Add missing .In zlib.hJune McEnroe 2018-11-11Add deflatePending.3June McEnroe 2018-11-11Add deflateBound.3June McEnroe 2018-11-11Add deflateTune.3June McEnroe 2018-11-10Add deflateParams.3June McEnroe 2018-11-10Add deflateReset.3June McEnroe 2018-11-10Add deflateCopy.3June McEnroe 2018-11-10Add deflateSetDictionary.3June McEnroe 2018-11-10Remove initial deflate(3) reference in deflateInit2.3June McEnroe 2018-11-10Remove trailing whitespaceJune McEnroe 2018-11-10Add deflateInit2.3June McEnroe 2018-11-10Refer to deflate(3) for z_streamp typeJune McEnroe 2018-11-10Document z_stream fields in deflate.3June McEnroe 2018-11-10Add inflate.3June McEnroe 2018-11-09Use Pq/Po/Pc moreJune McEnroe 2018-11-09Add FreeBSD MakefileJune McEnroe 2018-11-09Add deflate.3June McEnroe