TIOCEXCL and recovering from it.

Doug Gwyn gwyn at smoke.brl.mil
Sun Apr 21 09:49:50 AEST 1991


In article <8189 at alpha.cam.nist.gov> coleman at cam.nist.gov (Sean Sheridan Coleman X5672) writes:
>In a program I wrote, I set TIOEXCL bit on a serial line.
>Unfortuantly, the bit wasn't removed when I did a CTRL-C.

Yes, that's why you need a SIGINT handler in your program.

>My question is: Is there a way to clear this port without 
>having to reboot since I have lost the file descriptor when I 
>quit the program.

I assume the problem is that some process still has the device open.
Basically, you'll have to kill the process.  (The TIOCEXCL is going
to prevent additional opens, which would be necessary in order to
apply a TIOCNXCL.)



More information about the Comp.unix.questions mailing list