Unix Technical Forum

threading issue : SIGPIPE => SIG_IGN (writing to closed socket)

This is a discussion on threading issue : SIGPIPE => SIG_IGN (writing to closed socket) within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hello, hopefully you can give me an answer how HP/UX (11.11 and 11.2x) reacts (I found different opinoins in ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 05:46 AM
Oliver Kowalke
 
Posts: n/a
Default threading issue : SIGPIPE => SIG_IGN (writing to closed socket)

Hello,
hopefully you can give me an answer how HP/UX (11.11 and 11.2x) reacts (I
found different opinoins in the inet):

In a multithreaded library a thread sets the sigaction SIG_IGN for signal
SIGPIPE if it tries to write to a socket and resets to the old sigaction
with SIG_DFL afterwards.

Will EPIPE allways be returned to the same thread if the socket was closed
before write (and RST was received)?

If yes is this guaranteed?

thanks and kind regards,
Oliver
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 05:50 AM
rajesh.vijayarajan@gmail.com
 
Posts: n/a
Default Re: threading issue : SIGPIPE => SIG_IGN (writing to closed socket)

On Dec 30 2006, 2:25 pm, Oliver Kowalke <oliver.kowa...@gmx.de> wrote:
> Hello,
> hopefully you can give me an answer how HP/UX (11.11 and 11.2x) reacts (I
> found different opinoins in the inet):
>
> In a multithreaded library a thread sets the sigaction SIG_IGN for signal
> SIGPIPE if it tries to write to a socket and resets to the old sigaction
> with SIG_DFL afterwards.
>
> Will EPIPE allways be returned to the same thread if the socket was closed
> before write (and RST was received)?
>
> If yes is this guaranteed?
>
> thanks and kind regards,
> Oliver


I hope I interpreted your question correctly.

In a multi-threaded environment, the only way you can guarantee that
only a particular thread will receive and process a signal, is by
masking that particular signal in all other threads.

-Rajesh

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com