This is the mail archive of the cygwin@cygwin.com 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]

Threads question


Hi,

I have a question:

if I install a handler like this:

void __coredump(int sig) {
	std::cerr << "stop" << std::endl;
}

int main(int argc, char *argv[])
{
  struct sigaction act;
  act.sa_handler = __coredump;

  sigaction(SIGSEGV, &act, NULL);

  /* ... */
  /* then I launch a thread that will certainly make a segmentation fault */
  /* ... */

  return 0;
}

is the created thread supposed to inherits the handler ?
or do I have to re-install it ?

thanks.


Jean Barata - SOFTEAM
01.30.12.18.67 - jean.barata@softeam.fr
--------------------------------------------
SOFTEAM
Immeuble sesame
8 rue germain soufflot
78184 St Quentin en yvelines cedex



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]