public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Cancelling a Blocking network call
@ 2001-08-20 15:11 Trenton D. Adams
  2001-08-20 15:20 ` Gary Thomas
  0 siblings, 1 reply; 6+ messages in thread
From: Trenton D. Adams @ 2001-08-20 15:11 UTC (permalink / raw)
  To: 'eCos Discussion'

Is it possible to do this?  If so, I would imagine the only way would be
to call close () on the socket right?

Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1

Phone: 403 640 9494 ext-208
Fax: 403 640 9599

http://www.extremeeng.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] Cancelling a Blocking network call
  2001-08-20 15:11 [ECOS] Cancelling a Blocking network call Trenton D. Adams
@ 2001-08-20 15:20 ` Gary Thomas
  2001-08-20 15:21   ` Trenton D. Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2001-08-20 15:20 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: eCos Discussion

On 20-Aug-2001 Trenton D. Adams wrote:
> Is it possible to do this?  If so, I would imagine the only way would be
> to call close () on the socket right?
> 

What do you mean 'cancel'?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] Cancelling a Blocking network call
  2001-08-20 15:20 ` Gary Thomas
@ 2001-08-20 15:21   ` Trenton D. Adams
  2001-08-20 16:34     ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Trenton D. Adams @ 2001-08-20 15:21 UTC (permalink / raw)
  To: 'Gary Thomas'; +Cc: 'eCos Discussion'

Let's say I call write () on a socket, and the other end of the
connection hangs.  I might want to cancel that call.  If the write ()
was done in another thread then yet another thread might be able to
cancel the write () call.

-----Original Message-----
From: gary@chez-thomas.org [ mailto:gary@chez-thomas.org ] On Behalf Of
Gary Thomas
Sent: Monday, August 20, 2001 4:24 PM
To: Trenton D. Adams
Cc: eCos Discussion
Subject: RE: [ECOS] Cancelling a Blocking network call



On 20-Aug-2001 Trenton D. Adams wrote:
> Is it possible to do this?  If so, I would imagine the only way would
be
> to call close () on the socket right?
> 

What do you mean 'cancel'?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Cancelling a Blocking network call
  2001-08-20 15:21   ` Trenton D. Adams
@ 2001-08-20 16:34     ` Jonathan Larmour
  2001-08-21  7:31       ` Trenton D. Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-20 16:34 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: 'Gary Thomas', 'eCos Discussion'

"Trenton D. Adams" wrote:
> 
> Let's say I call write () on a socket, and the other end of the
> connection hangs.  I might want to cancel that call.  If the write ()
> was done in another thread then yet another thread might be able to
> cancel the write () call.

You could include the fileio and posix packages and use signals.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] Cancelling a Blocking network call
  2001-08-20 16:34     ` Jonathan Larmour
@ 2001-08-21  7:31       ` Trenton D. Adams
  2001-08-21  7:40         ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Trenton D. Adams @ 2001-08-21  7:31 UTC (permalink / raw)
  To: 'Jonathan Larmour'
  Cc: 'Gary Thomas', 'eCos Discussion'

I suppose I could, couldn't I! :)  Is there any way of targetting a
specific thread only with the signal?

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[ mailto:ecos-discuss-owner@sources.redhat.com ] On Behalf Of Jonathan
Larmour
Sent: Monday, August 20, 2001 5:34 PM
To: Trenton D. Adams
Cc: 'Gary Thomas'; 'eCos Discussion'
Subject: Re: [ECOS] Cancelling a Blocking network call


"Trenton D. Adams" wrote:
> 
> Let's say I call write () on a socket, and the other end of the
> connection hangs.  I might want to cancel that call.  If the write ()
> was done in another thread then yet another thread might be able to
> cancel the write () call.

You could include the fileio and posix packages and use signals.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223)
271062
Maybe this world is another planet's Hell -Aldous Huxley ||
Opinions==mine

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Cancelling a Blocking network call
  2001-08-21  7:31       ` Trenton D. Adams
@ 2001-08-21  7:40         ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-21  7:40 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: 'Gary Thomas', 'eCos Discussion'

"Trenton D. Adams" wrote:
> 
> I suppose I could, couldn't I! :)  Is there any way of targetting a
> specific thread only with the signal?

pthread_kill(), or mask the signal in all the other threads.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-21  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 15:11 [ECOS] Cancelling a Blocking network call Trenton D. Adams
2001-08-20 15:20 ` Gary Thomas
2001-08-20 15:21   ` Trenton D. Adams
2001-08-20 16:34     ` Jonathan Larmour
2001-08-21  7:31       ` Trenton D. Adams
2001-08-21  7:40         ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).