<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.10.1">
</HEAD>
<BODY>
Hello,<BR>
I've scoured the lists and googled everywhere but came up short-handed. I'm trying to use parport on RedHat 8 (Linux 2.4.20-8) in two parallel processes. One process handles the data transfer, the other probes the device for status information.<BR>
With just one process, everything works fine. When the second process tries to read or write data, it always fails. The code PPCLAIMs the file descriptor (fd) before each read/write and PPRELEASEs it afterward. There is no problem with claiming or releasing each fd in each process, but the second process always writes zero bytes and hangs on read.<BR>
When /dev/parport0 is opened with O_NOBLOCK, the read no longer hangs but simply returns with status=-1 and errno=EAGAIN (Resource temporarily unavailable). Monitoring the PPRSTATUS value before each read in the first process always shows 0xD6 (PARPORT_STATUS_BUSY set), but in the second process it always shows 0x56 (neither BUSY or ERROR set).<BR>
What am I doing wrong, and how can I share the parport with both processes? Thanks,<BR>
Brent Washburne<BR>
MIPS Technologies, Inc.<BR>
First Silicon Solutions (FS2) Division
</BODY>
</HTML>