On Feb 20, 2013, at 4:10 PM, Mr. Gecko wrote:

> I have written a daemon that listens for an incoming connection, runs a 
> process using NSTask, and sends the output to the connection. After a couple 
> of hours of receiving connections at varying lengths of time… The system has 
> all of it's pipes taken, and the process stops sending responses to the 
> connections. I know that the pipes are all taken because... If I was to run 
> something in terminal such as "cat Makefile | less", less will not output 
> anything. If I was to run git log, I would not get anything (git log outputs 
> the history of a repository to less via a pipe).
> 
> I made a test which shows the issue with an exception… Can someone help me 
> find out how to close the pipes or something of the sort?

Run your program under the Object Allocations and Leaks instruments and see if 
it can identify NSPipe objects that are still alive after you think they 
shouldn't be.  Then use the object retain/release history to try to figure out 
why.

I didn't immediately see any memory management bugs.  Can't hurt to have the 
static analyzer check, too.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to