This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] posix: Fix open file action for posix_spawn on Linux


* Adhemerval Zanella:

> On posix_spawn open file action (issued by posix_spawn_file_actions_addopen)
> POSIX states that if fildes was already an open file descriptor, it shall be
> closed before the new file is openedi [1].  This avoid pontential issues when
> posix_spawn plus addopen action is called with the process already at maximum
> number of file descriptor opened and also for multiple actions on single-open
> special paths (like /dev/watchdog).
>
> This fixes its behavior on Linux posix_spawn implementation and also adds
> a tests to check for its behavior.

The patch appears to be incomplete:

../sysdeps/unix/sysv/linux/spawni.c: In function ‘__spawni_child’:
../sysdeps/unix/sysv/linux/spawni.c:244:3: error: implicit declaration of function ‘fd_is_valid’ [-Werror=implicit-function-declaration]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]