[Linux-parport] parport not automatically released by child process

Eddy De Greef degreef at imec.be
Thu Jan 15 11:52:52 GMT 2004

On 2004.01.15 11:25 Tim Waugh wrote:
> On Wed, Jan 14, 2004 at 03:06:16PM +0100, Eddy De Greef wrote:
> > on some older 2.4 kernels, I experience the following problem:
> > when a process opens /dev/parport0 and then forks, and the child 
> > claims the port and exits without releasing it, the parent process
> > can no longer claim the port. I would expect that the port is 
> > automatically released when the child exits. 
> The kernel driver doesn't get to know that the child exited.  They are
> sharing the same file descriptor.
> If the child instead opened /dev/parport0 itself everything should
> work as expected -- or, of course, if the child releases the port
> itself.

Ok, that makes sense. I can't change much about the way the port is 
opened, and the child can be interrupted before it has a chance to 
release the port, but I can install a signal handler that makes sure
that the port is always released. 

Thanks for your swift response,


More information about the Linux-parport mailing list