site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com <http://developer.apple.com/samplecode/QISA/listing38.html> for (int i = STDERR_FILENO + 1; i < 1024; ++i) close(i) -Marc _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... You can set up file descriptors between the call to fork and the call to execv. Since it's already in the child process, it doesn't do anything to to the descriptors in the parent. MoreIsBetter has an example: I've also read that you should close all unused file descriptors in the child process so they don't leak information into the other executable. After setting up std in/out/err, something like: Except that there's a constant for 1024, but I'm not finding it at the moment. This email sent to site_archiver@lists.apple.com