Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6696753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:22:43+00:00 2026-05-26T06:22:43+00:00

I try yo use sigtimedwait according to the code below, I got this message

  • 0

I try yo use sigtimedwait according to the code below, I got this message “Caught unexpected signal 4714397, error 0, code 370078816”. Does anyone know where I can the corresponding map of those number?

    sigset_t oMask;
    siginfo_t oInfo;
    struct timespec oTimeout;

    /* Create a mask holding */

    sigemptyset(&oMask);
    sigaddset(&oMask, SIGINT );
    sigaddset(&oMask, SIGTERM );

    /* Set the mask for our main thread to include SIGINT */

    pthread_sigmask( SIG_BLOCK, &oMask, NULL );

    /* Max wait for ^C set to 5 seconds */

    oTimeout.tv_sec = 5;
    oTimeout.tv_nsec = 0;

    int iRet = -1;
    bool bStop = false;
    while (!bStop)
    {
        iRet = sigtimedwait(&oMask, &oInfo, &oTimeout);
        if ( -1 == iRet && EAGAIN == errno)
        {
        }
        else
        {
            switch (oInfo.si_signo)
            {
            case SIGINT:
                printf( "Caught SIGINT in sigtimedwait( )\n" );
                bStop = true;
                break;
            case SIGTERM:
                printf( "Caught SIGTERM in sigtimedwait( )\n" );
                bStop = true;
                break;
                /* Should never really get to default */

            default:
                printf( "Caught unexpected signal %d, error %d, code %d\n", oInfo.si_signo, oInfo.si_errno,oInfo.si_code),oInfo.si_code) ;
                break;
            }
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:22:44+00:00Added an answer on May 26, 2026 at 6:22 am

    I think you may be missing some logic there. If you get an error return of -1 but errno is not EAGAIN, you seem to assume it worked and the oInfo variable contains valid data.

    This may cause a problem if your process is interrupted during the wait, since one of the valid return codes is EINTR.

    In that case, oInfo is going to contain whatever rubbish was on the stack when you entered that function, something borne out by the fact that I’m pretty certain signals don’t go up to 4714397 🙂

    Simple way to find out: print out iRet and errno in your default case.

    There’s also something hideously wrong with your line:

    printf( "Caught unexpected signal %d, error %d, code %d\n",
        oInfo.si_signo, oInfo.si_errno,oInfo.si_code),oInfo.si_code) ;
    

    but I’m going to assume that’s just a typo on your part and it’s really something like:

    printf ("Caught unexpected signal %d, error %d, code %d\n",
        oInfo.si_signo, oInfo.si_errno, oInfo.si_code);
    

    The change I would make to it would be:

    printf ("Caught unexpected signal %d, error %d, code %d, errno %d, iret %d\n",
        oInfo.si_signo, oInfo.si_errno, oInfo.si_code, errno, iRet);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to use this code for toggling text on the link: var showText=<span>Open</span>
how to generate random number in this code? I try use $RANDOM, but the
I try to use the following code: ArrayList<String> Map<String, String> Eclipse complains about both
I try to use this mapping : @Entity @Table(name=ecc.\RATE\) @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name=DISCRIMINATOR, discriminatorType= DiscriminatorType.STRING) public
I try to get TO: user@mail.com field from mime mail message. I have code:
I try use reCaptcha and integrated with php, so if code is correct email
Hi i try use Nlog in with caliburn micro, I have use this tutorial
I try to use the domainpeople.com API and to do I need to use
I try to use doctest from example from http://docs.python.org/library/doctest.html But when I run python
I try to use the winDBG to debug a dump file. When I run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.