Re: Can't re-open serial port after closing it
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
Rick Mann