[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: exec redirection is undone if fd (>9) has O_CLOEXEC
From: Chet Ramey <chet.ramey () case ! edu>
Date: 2024-02-26 22:20:29
Message-ID: 432dd658-a4b9-434b-b1a4-a8c293116d09 () case ! edu
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
[Attachment #4 (text/plain)]
On 2/24/24 5:40 AM, Koichi Murase wrote:
> Meanwhile, the behavior that `exec 50>2.txt' does not have an effect
> does not seem to be the intentional design. It seems to be just a
> side effect of the manipulation of the saved fds. In this sense, the
> strange behavior I observe is the one that Chet did not primarily
> intend, I guess. But it's just my naive guess.
Manipulating the close-on-exec flag is not something the shell allows the
user to do out of the box. If you want to use something like a loadable
builtin to change that, strange things might happen.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
["OpenPGP_signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic