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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:12:49+00:00 2026-06-17T05:12:49+00:00

When I execute a command using system(COMMAND) function in C++ code running on Linux,

  • 0

When I execute a command using system(COMMAND) function in C++ code running on Linux,
the return values of calls of system(COMMAND) are not same from each other.
Do we have any ways to detect segmentation fault or abnormal termination by using return value of system(COMMAND) function?

For example, when I got segmentation fault after executing a command by using system function, I confirmed the return value of that function was 35584. However, I could not know what that return value means, and I am not sure all possible segmentation faults return 35584.
Is there a way to detect all possible values of return values when I encounter segmentation fault or abnormal termination?

  • 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-06-17T05:12:51+00:00Added an answer on June 17, 2026 at 5:12 am

    man 3 system refers to man 2 wait for the meaning of return value. The latter page describes several macros usable with this value, notably WIFSIGNALED(status) and WTERMSIG(status). That’s what you can use to check for segmentation fault or termination on other signals.

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

Sidebar

Related Questions

Here i used below in code on linux. using cp command in system function.
novice Perl programmer here!. I'm using the system() function to get the return code
How can I execute a test case from Command Console using NUnit? I had
I am trying to execute windows commands from Java using the following code, Process
The code below will output: Event published Command executed Using System.Transactions how can I
I'm trying to execute a command using the following code snippet: foreach($package in (Get-Childitem
How do I properly execute commands in the command line using php? For example
I'm trying to do a 'within' query using mongomapper. When I execute the command
When I execute delphi 2009 project using MSBuild command line, output always goes to
I have the following to execute shell commands using Node: function puts( error, stdout,

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.