Re: Redirecting Output for a fork()'d Process
Re: Redirecting Output for a fork()'d Process
- Subject: Re: Redirecting Output for a fork()'d Process
- From: Avi Drissman <email@hidden>
- Date: Thu, 12 Apr 2007 12:39:54 -0400
On 4/12/07 12:23 PM, Marc Epard wrote:
for (int i = STDERR_FILENO + 1; i < 1024; ++i)
close(i)
Except that there's a constant for 1024, but I'm not finding it at the
moment.
Not a constant, but close. getdtablesize().
Also, my Linux guy told me to use fcntl(i, F_SETFD, FD_CLOEXEC) rather
than close(). I don't recall the reason why.
Avi
--
Avi Drissman email@hidden
+--------------------------------------------------------------------+
http://avi.drissman.com/
Argh! My mail server is trunca
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden