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 7069545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:27:30+00:00 2026-05-28T05:27:30+00:00

First : Appologize for my bad english. Sorry for this newbie software question, but

  • 0

First : Appologize for my bad english.

Sorry for this newbie software question, but I got lost with my own logic…

A bit background :

I am working on a C networking project, where I am trying to generate a server that receive gradually increasing UDP message within the increasing time. I am trying just to simple “manager” on this server that is able to send a report to a specific address when it is crashing.

The thing that come in mind is that I set this manager as a listener in the server side. So if the server does not receive any message within the predefined port, I assume the server fails.
But, this thing is not -somehow- a deterministic approach. How long should I specify the time if this server crash? (if in 5 minutes no message is received in the port, does it mean it is crashing? not necessarly true. I can again increase it to 10 mins, buat again, this is unjustiable and inconsistent)

I am thinking how an app like gdb can do this. If the server(framework) crash, it will automatically generate a coredump file. I need to do a similar thing like this, so when the framework crash, it will as easy as print a “hello crash”. How to create a “manager” on the server that can give me a report if the server crash (using C )

Any idea would be greatly appreciated

Thank you so much

  • 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-28T05:27:31+00:00Added an answer on May 28, 2026 at 5:27 am

    The exit code of a process tells you if a signal caused it to exit. You can write a C program and use wait() to get the exit code or do it in a shell script:

    #!/bin/sh
    
    ./server "$@"
    
    EXIT=$?
    
    if [ $EXIT -eq 0 ]
    then
        echo exit success
    else
        if [ $EXIT -ge 128 ]
        then
            echo exited with signal $(($EXIT - 128))
        else
            echo exited with code $EXIT
        fi
    fi
    

    You could choose to restart the server for the failure case or the signal case.

    Most servers rely on careful debugging and do not expect to automatically catch and restart when they crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, let me apologize if this is the world's stupidest question. But, I'm stumped
First of all I apologize in advance for this question, a bit off the
First off, I apologize if this question has already been asked. I searched but
First off I apologize... I have posted this question before, but I did a
First of all I want to apologize for my bad English. I have a
I want to apologize for my bad english first. I am trying to implement
First I want to apologize for such a silly question but I'm quite new
First of all, apologize because I have seen some posts about this, but I
First let me appologize if my description of this is completely retarded, still learning
Note: Let me appologize for the length of this question, i had to put

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.