This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/4067] possible problem in sigaction resulting into segfault


------- Additional Comments From nico-linux-glibc at schottelius dot org  2007-02-17 19:53 -------
Sorry, used the wrong version with initialized flags. glibc-2.5 also segfaults,
if sa.flags is uninitialized. Use this code to reproduce:

---------------------------
   struct sigaction sa;
   
   if(action == ACT_SERV) {
      sa.sa_handler  = sig_child;
//      sa.sa_flags    = SA_NOCLDSTOP; 
   } else {
      sa.sa_handler=SIG_DFL;
//      sa.sa_flags    = 0;
   }
//   sigemptyset(&sa.sa_mask);

   sigaction(SIGCHLD,&sa,NULL);     /* what todo when a child exited    */

---------------------------

And then fork() away and tada: segfault _after_ the sigchild handler exits.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|VERIFIED                    |REOPENED
         Resolution|FIXED                       |


http://sourceware.org/bugzilla/show_bug.cgi?id=4067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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