Serial port

Toby Dickenson toby at tarind.com
Thu Jul 2 07:10:22 UTC 2009


Justin Hart wrote:

> I have the following scenario:
> 
> 1)  Program opens serial port
> 2)  Program crashes
> 3)  Now the serial port is hung and can't be re-opened
> 
> Is there a way to close the serial port so that it can be used again
> without rebooting the machine?

What makes you think the port cant be reopened?

Unlike some other operating systems, linux does not prevent serial ports 
from being opened multiple times, so it sounds like a kernel/driver bug or 
hardware problem if 'open' is failing.

Clashes are prevented by applications maintaining a lock file in /var/lock. 
More details at http://tldp.org/HOWTO/Serial-HOWTO-14.html







More information about the ubuntu-users mailing list