Eric Blake wrote:
> On 11/22/2010 03:16 PM, Chet Ramey wrote:
> >> include/filecntl.h in bash-4.1 has following:
> >>
> >> #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
> >>
> >> Is that really the correct/intended usage of F_SETFD ?
> >
> > F_SETFDSet the clo
On Mon, Nov 22, 2010 at 04:04:46PM -0800, Sukadev Bhattiprolu wrote:
> Eric Blake [ebl...@redhat.com] wrote:
> | On 11/22/2010 03:16 PM, Chet Ramey wrote:
> | >> include/filecntl.h in bash-4.1 has following:
> | >>
> | >> #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
> | >>
> |
Eric Blake [ebl...@redhat.com] wrote:
| >
| > So if bash is the one creating its file descriptors, there's no need to
| > use R/M/W since it knows what the state of them are.
|
| No, bash cannot reasonably know what the implementation's default bit
| state is, and blindly setting all other bits t
On 11/23/2010 07:42 AM, Matthew Wilcox wrote:
> The POSIX definition can be found here:
> http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html
>
>> | In practice, there aren't any such systems; but POSIX warns that current
>> | practice is no indicator of future systems, and that rea
Eric Blake [ebl...@redhat.com] wrote:
| On 11/22/2010 03:16 PM, Chet Ramey wrote:
| >> include/filecntl.h in bash-4.1 has following:
| >>
| >> #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
| >>
| >> Is that really the correct/intended usage of F_SETFD ?
| >
| > F_SETFD
On 11/22/2010 03:16 PM, Chet Ramey wrote:
>> include/filecntl.h in bash-4.1 has following:
>>
>> #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>>
>> Is that really the correct/intended usage of F_SETFD ?
>
> F_SETFDSet the close-on-exec flag associated with fi
> include/filecntl.h in bash-4.1 has following:
>
> #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>
> Is that really the correct/intended usage of F_SETFD ?
F_SETFDSet the close-on-exec flag associated with fildes to
the low order bit