bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exec redirection is undone if fd (>9) has O_CLOEXEC


From: Chet Ramey
Subject: Re: exec redirection is undone if fd (>9) has O_CLOEXEC
Date: Mon, 26 Feb 2024 17:20:29 -0500
User-agent: Mozilla Thunderbird

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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]