=?iso-8859-1?q?Rafael=20Gonz=FFffffe1lez?= wrote:
> 
> Hello GForth list:
> 
> I am doing I/O from a client socket using key?-file
> and key-file using  multitasking. I'd like to detect
> when the server crashes or exists. 
> 
> key-file  returns -1 when the server has exited.
> key?-file returns false when the server has exited, as
> if no chars were received.
> 
> So it seems key?-file is useless to detect this
> situation and using key-file  your task could be
> blocked, defeating the use of pause. 
> Is there any workaround ?

If you are using a POSIX system, maybe wait(2)/waitpid(2) with the
WNOHANG option or somesuch will do what you want.  Of course, this
requires you to use the undocumented C interface.

- anton

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to