Re: sh(1) exec redirection

2024-11-06 Thread Mouse
> Yes, that is exactly the issue, we want > exec 3>whatever > to set close-on-exec (by default) as typically fds created that way > are just for the script to use, and shouldn't be passed through to > children. We do? Perhaps if this were just being designed now. But breaking existing us

Re: sh(1) exec redirection

2024-11-06 Thread Mouse
> Maybe you remember in the 6th end and before days [...] I don't. My experience with anything Unixy started with BSD 4.1c, and that only barely before 4.2 came out. > This change was made to the NetBSD sh in Jan 2016. It is being > complained about almost 9 years later. That speaks to large

Re: sh(1) exec redirection

2024-11-06 Thread Robert Elz
Date:Wed, 6 Nov 2024 08:03:37 -0500 (EST) From:Mouse Message-ID: <202411061303.iaa03...@stone.rodents-montreal.org> | But breaking existing use cases strikes me as a Very Bad Idea. What existing use cases? Passing random fds to unrelated (as in not part of a set o

Re: sh(1) exec redirection

2024-11-06 Thread Edgar Fuß
I can understand that NetBSD's sh derives (unless set -o posix is given) from SUS in cases where SUS documents brain-dead historical behaviour. However, passing fd's opened by exec to commands called later on doesn't appear obviously brain-dead to me. Wouldn't it be more appropriate to have a c