its best to look at the manpage for the function to check
what happens in the case of interruption. but they usualy
just return -1 and set errstr will contain the string
"interrupted". plan9 does no syscall restarting.
read notify(2) and thread(2).
--
cinap
--- Begin Message ---
[email protected] wrote:
to interrupt on i/o operations you send a note to the process.
for ioproc(2), here is iointerrupt() that does that. for timeouts here is
a alarm() function (see sleep(2)) that will fire a note on you when the alarm
expires.
notes should also work for rendezvous()/alt(), but a better way is to include
a timeout/cancel channel in your alt() operation. as a example see
/sys/src/cmd/rio/time.c. here we have a central timer process
that does a sleep and sends a message to channels associated
with timers when they expire.
--
cinap
Thank you very much.
Where can I find the explanation of the interrupted system calls behaviour ?
In Unix I sometimes found quite difficult to deal with them.
What about Plan9 ?
adriano
--- End Message ---