Scenario 1
Lets say the following scenario exists.
My program makes a call to a 3rd party library which in turn calls another 3rd party library which turns around and makes OS calls.
MyProgram
|
some3rdPartyFunction() ---> 3rd party library
|
another3rdPartyFunction()----> another 3rd party library
|
OS call()
1st Set of Questions:
- If this OS calls makes a socket call to a closed socket, what happens?
- Is an error returned to the process making the OS call?
- At what point does the system return a SIGPIPE message?
- Does the SIGPIPE only get sent to the calling function or does the SIGPIPE get propagated all the way up to MyProgram?
Scenario 2
I happen to see the following output of a thread dump of a process.
rt_sigprocmask(SIG_SETMASK, ...)
rt_sigreturn({mask=[PIPE]})
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, [], [], 8) = 0
rt_sigaction(SIGTERM, [], [], 8) = 0
rt_sigaction(SIGHUP, [], [], 8) = 0
rt_sigaction(SIGABRT, [], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], [], 8) = 0
rt_sigreturn({mask=[PIPE]})
2nd Set of Questions:
- Why are so many signal messages being sent?
- Would these be getting sent directly to MyProgram or being propagated up from the lower OS call?
- With the variety of signals being sent, how to determine which one is actually causing the problem?