comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Terminate program in Ada95
Date: 2000/11/27
Date: 2000-11-27T00:00:00+00:00	[thread overview]
Message-ID: <87itp92kd9.fsf@deneb.enyo.de> (raw)
In-Reply-To: 3A226987.325D7B24@mail.com

Mats Weber <matsw@mail.com> writes:

> If it is UNIX or UNIX-like (which it probably is if you are using
> sockets) then you can close the sockets with pending I/O operations from
> outside the task doing the socket I/O. This will make any pending
> opertion on the socket exit with an error code that is hopefully handled
> in the task.

This might introduce a race condition because the file descriptor
used by the socket might be reused soon.  I think the shutdown socket
operation is better than simply closing the socket under these
circumstances (it will cause subsequent operations on the socket to
fail, but doesn't release the file descriptor at once).




  reply	other threads:[~2000-11-27  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-27  0:00 Terminate program in Ada95 Atle R�stad
2000-11-27  0:00 ` Robert A Duff
2000-11-27  0:00 ` Mats Weber
2000-11-27  0:00   ` Florian Weimer [this message]
2000-11-27  0:00 ` Ted Dennison
2000-11-27  0:00 ` Alfred Hilscher
2000-11-27  0:00   ` Warren W. Gay VE3WWG
2000-11-27  0:00 ` Marc A. Criley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox