Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!rex!uflorida!gatech!purdue!haven!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: TIOCEXCL and recovering from it. Message-ID: <15922@smoke.brl.mil> Date: 20 Apr 91 23:49:50 GMT References: <8189@alpha.cam.nist.gov> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14 In article <8189@alpha.cam.nist.gov> coleman@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.)