Re: fork()/exec() and X11 streams usage.
Re: fork()/exec() and X11 streams usage.
- Subject: Re: fork()/exec() and X11 streams usage.
- From: Robert Tillyard <email@hidden>
- Date: Fri, 12 Oct 2012 17:47:44 +0100
Hello, Jeremy,
Thanks for your reply.
Before I call exec() I have to run through open fd's calling fcntl (fd, F_SETFD, 1);
Would posix_spawn() do this for me?
Regards, Rob.
On 12 Oct 2012, at 08:11, Jeremy Huddleston Sequoia wrote:
> No. posix_spawn is more efficient. At base, it's a single syscall instead of at-least 2. Beyond that, it allows the kernel to skip some possibly unnecessary action in setting up the new process... For example CLOEXEC fds would be created for the new process only to be destroyed on the subsequent exec...
>
> --Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden