Forgot to close a device file ... what now?

Jyrinx jyrinx_list at hotmail.com
Sat Sep 15 23:18:03 EDT 2001


Hey - Python newbie here. I'm running Python on Red Hat Linux 7.1. At
the interpreter prompt, I ran "fd = open("/dev/ttyS0", "wb")", then
went off to do something else, came back, forgot to close the file,
then quit Python. Next time I ran the interpreter, I tried to open the
serial port again, but I got an error saying the file is locked or
busy.

What can I do to reopen it, short of resetting the system?

Jyrinx
jyrinx_list at hotmail.com



More information about the Python-list mailing list