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: Chris Suter <email@hidden>
- Date: Sat, 14 Jul 2012 11:31:27 +1000
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