This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

signals of type SIGSEGV handled only once (in multithreaded process)


After excellently quick correction of pthread_kill when the argument
signal is zero
(by cgf), I have found another problem related to signal handling. The
code in attachment
demonstrates it ( because of pthread_kill, it must be run with
cygwin1-20080213.dll and newer ).
It seams that signal handlers for signals like SIGSEGV, SIGFPE are
called only once,
and the default handler is called for the second time the signal occures
in the process.
I'm not sure if the example is reasonable (e.g. pthread_exit in signal
handler...),
but works as expected on linux.

Output from the example compiled and run in linux:

Starting SIGSEGV1...
tid1=b7f1abb0
Sigaction success, errno = 0
Join1                ---> Result: 0, xx=8
Ret. value           ---> Result: 8, xx=8
Good thread create   ---> Result: 0, xx=8
Starting SIGSEGV2...
tid2=b7519bb0
Sigaction success, errno = 0
<--------------------------- this is the end in cygwin (crash info
message)------------
xx=9
Join2                ---> Result: 0, xx=9
Ret. value           ---> Result: 9, xx=9




Attachment: sigpk4.c
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]