Re: NSTask arguments
Re: NSTask arguments
- Subject: Re: NSTask arguments
- From: Kyle Sluder <email@hidden>
- Date: Wed, 20 Feb 2013 20:28:21 -0800
On Wed, Feb 20, 2013, at 08:22 PM, Kyle Sluder wrote:
> You can accomplish this without writing to the file system, but it
> involves foregoing NSTask. Fork, close stdin in the child process, open
> a pipe (so that the child gets the read end in fd 0), then exec the tool
> with "/dev/stdin" as the filename argument.
Actually, the appropriate order of operations here is pipe, fork,
close(stdin), dup(filedes[0]), exec.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden