All of lore.kernel.org
 help / color / mirror / Atom feed
* bash: Correct usage of F_SETFD
@ 2010-11-22 20:16 Sukadev Bhattiprolu
  2010-11-22 22:16 ` Chet Ramey
  0 siblings, 1 reply; 8+ messages in thread
From: Sukadev Bhattiprolu @ 2010-11-22 20:16 UTC (permalink / raw)
  To: linux-fsdevel, bug-bash


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 ?

If kernel ever adds a new flag to the fd, this would end up clearing the
other new flag right ?

Shouldn't bash use F_GETFD to get the current flags and set/clear just
the FD_CLOEXEC bit ?

Sukadev

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-24  1:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-22 20:16 bash: Correct usage of F_SETFD Sukadev Bhattiprolu
2010-11-22 22:16 ` Chet Ramey
2010-11-22 22:27   ` Eric Blake
2010-11-23  0:04     ` Sukadev Bhattiprolu
2010-11-23 14:42       ` Matthew Wilcox
2010-11-23 14:51         ` Eric Blake
2010-11-23 17:51           ` Sukadev Bhattiprolu
2010-11-24  1:17     ` Jamie Lokier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.