Re: Can't re-open serial port after closing it
Re: Can't re-open serial port after closing it
- Subject: Re: Can't re-open serial port after closing it
- From: Rick Mann <email@hidden>
- Date: Fri, 13 Jul 2012 18:32:31 -0700
Nope. Straight-up Cocoa app. I did some checking to make sure NSFileHandle was indeed closing the file descriptor, and it is. I tried closing it for it with close(), but it made no difference.
On Jul 13, 2012, at 18:31 , Chris Suter wrote:
> Hi Rick,
>
> On Saturday, 14 July 2012, Rick Mann wrote:
> I've got some code that opens a serial port, uses it, and then closes it (by calling close on the file descriptor). If I try to re-open it, I get a "resource busy" error. If I quit my app and try again, it's fine.
>
> Any ideas?
>
> Does your program spawn any child processes? If it does, you need to take care that the file descriptor is closed in the child process. There are a number of ways of doing that.
>
> Kind regards,
>
> Chris
_______________________________________________
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