Best way to stop a process listening to a socket

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Best way to stop a process listening to a socket

Sébastien Bigaret

    Hi all,

Suppose I have a process started w/ fork executing
socket>>waitForAcceptFor: with a long deadline.

Now suppose that I want it to to stop waiting, before the
deadline expires.

To stop it immediately, I've found out that signaling it with
Process>>signalException and handling it in the Process' code by a
Process>>BlockClosure>>on:do: works as expected.

Is this the correct way of doing it? Should I make a specific 'Error'
subclass for this?  Thanks for any advice.

__ Sébastien.

signature.asc (501 bytes) Download Attachment