From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: What to expect in dosemu-1.2? Date: Wed, 23 Jul 2003 20:21:48 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3F1EB61C.3070100@aknet.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000207020208020009030206" Return-path: List-Id: To: linux-msdos@vger.kernel.org This is a multi-part message in MIME format. --------------000207020208020009030206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello. Justin Zygmont wrote: >> - Client-server approach for port I/O, which allows > I wonder if this is why there is a lock file problem with > a modem now? No, this has nothing to do with locks. However there is a bug in a serial code which, but only in case open() fails, prints a misleading message that the device is already locked, and leaves a stale lock file. The fix is attached. This may not be the problem you see however. I have no idea what you see actually, as you have provided no details. But as I already have a fix to something similar - try it and maybe it will help. --------------000207020208020009030206 Content-Type: text/plain; name="ser_lock.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ser_lock.diff" --- src/base/serial/ser_init.c Sun Jul 20 17:43:22 2003 +++ src/base/serial/ser_init.c Wed Jul 23 07:34:57 2003 @@ -245,6 +245,14 @@ } com[num].fd = RPT_SYSCALL(open(com[num].dev, O_RDWR | O_NONBLOCK)); + if (com[num].fd < 0) { + error("SERIAL: Unable to open device %s: %s\n", + com[num].dev, strerror(errno)); + if (tty_lock(com[num].dev, 0) >= 0) /* Unlock port */ + com[num].dev_locked = FALSE; + com[num].fd = -2; // disable permanently + return -1; + } RPT_SYSCALL(tcgetattr(com[num].fd, &com[num].oldset)); return (com[num].fd); } --------------000207020208020009030206--