Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I'm facing a coredump in my code in a signal handler inside the function "__pthread_alt_unlock", could you please help me giving inputs on this issue, below is the signal ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    3

    Query on coredump in signal handler

    Hi,

    I'm facing a coredump in my code in a signal handler inside the
    function "__pthread_alt_unlock", could you please help me giving
    inputs on this issue, below is the signal handler looks like:

    void SignalHandler::sig_chld(int signo, siginfo_t *sip, void *extra)
    {
    //post a event to let AM main thread handle the sigchld
    sigChildEvent* event = new sigChildEvent( sip->si_pid,sip-

    >si_code);

    QThread:ostEvent(AM_MainFrame::instance()->signalHandler() ,
    event);

    if (waitpid(sip->si_pid, NULL, WNOHANG) != sip->si_pid)
    {
    }

    }

    And moreover i can see a symbol "__pthread_sighandler" in the
    backtrace of the dump, does it mean that the signal handler will be
    called in a different thread?

    Please give your inputs ASAP. Thanks in advance.

    Regards
    Kiran.

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Within a signal handler, allocating memory (as, for example, with a new statement) is a no-no.
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...