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

2024-02-26 Thread Chet Ramey
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 d

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

2024-02-26 Thread Chet Ramey
On 2/24/24 12:11 AM, Koichi Murase wrote: I have a question. Maybe it's not technically a bug as fd > 9 is involved, but the resulting behavior appears to be strange. I received some reports from users in my project and tried to find out what is happening. This is a reduced case: #!/usr/bi

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

2024-02-24 Thread Koichi Murase
2024年2月24日(土) 15:32 Emanuele Torre : > On Sat, Feb 24, 2024 at 02:11:25PM +0900, Koichi Murase wrote: > > I have a question. Maybe it's not technically a bug as fd > 9 is > > involved, but the resulting behavior appears to be strange. I > > received some reports from users in my project and tried

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

2024-02-23 Thread Emanuele Torre
On Sat, Feb 24, 2024 at 02:11:25PM +0900, Koichi Murase wrote: > I have a question. Maybe it's not technically a bug as fd > 9 is > involved, but the resulting behavior appears to be strange. I > received some reports from users in my project and tried to find out > what is happening. This is a