TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Mark Wuest 74030,332
date: 1991-02-21 21:49:37
subject: #Egads! Can`t signal!

#: 9588 S12/OS9/68000 (OSK)
    21-Feb-91  21:49:37
Sb: #Egads! Can't signal!
Fm: Mark Wuest 74030,332
To: all

I am looking for ideas to work around a "feature" of OSK device drivers. When a
process is in a write() and it gets blocked (flow control, other end of pipe
not read()ing, whatever), it is not possible to send signals other than SIGKILL
(which it can't catch) to that process until it wakes up from the blocked
write(). Of course, for read(), one can do _gs_rdy() beforehand to make sure
there is something there to read() before actually doing it. What about
write()? Any ideas?
 FWIW: the block occurs on a write to /pipe, an unnamed pipe. I have presently
worked around it with something like:
 while(1){
     if(_gs_rdy(path)
         read(path,&buf,sizeof(buf);
 }
 After I send it a SIGHUP, since all I want it to do is die gracefully.
 BUT: sometimes it might be nice to signal a blocked process to stop write()ing
and do something else.
 I hope my question is clear. Microware Technical Support had no general answer
(except that, in some cases, you know the size of the device's buffer, and you
can do _gs_rdy() on it and subtract to get the amount of buffer left).
 Thanks.
 Mark

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.