Am Thu, 22 Jan 2004 00:38:06 -0800 hat Valentyn Kamyshenko
<address@hidden> geschrieben:
Do I understand correctly, that for proper signal handling (in unix)
the main branch should explicitly pass control to the scheduler? That
is, e.g., if I use a library that uses (blocking) select or accept,
the signals will be queued until the select (or accept) returns?
Is there a workaround?
I'm not sure I understand completely. You mean that you have the
situation
that you are doing a blocking I/O operation in a library, but you want
to
handle signals during that time, right?
Hm. Tricky. Signals will be registered ok, but (as you correctly point
out), until execution is resumed in compiled Scheme code, the signal
will not be handled by the user-defined signal handler. It is not
possible to execute the Scheme code exactly at the point when the OS
triggers the signal, so the only solution I currently see is to
block repeatedly with a timeout. Now when the blocking takes place
in an external library, this might not be possible. Does the
library provide some hook for interrupting and resuming the I/O
operation, or perhaps to specify a timeout?