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

This is a discussion on threading issue : SIGPIPE => SIG_IGN (writing to closed socket) - HP UX ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

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

  1. 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

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

    On Dec 30 2006, 2:25 pm, Oliver Kowalke 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


+ Reply to Thread