1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zina [86]
3 years ago
10

Modify your solution to Problem 8.24 so that one (and only one) child installs a Segmentation-fault handler which prints an erro

r message and exits. What is the output of the program after this change?
Computers and Technology
1 answer:
aksik [14]3 years ago
8 0

/* Figure 8.18 */ #include "csapp.h" #define N 2 int main() int status, i; pid_t pid; /* Parent creates N children */ for (i = 0; i < N; i++) if ((pid = Fork ()) == 0) /* child */ exit(100+i); /* Parent reaps N children in no particular order */ while ((pid = waitpid(-1, &status, 0)) > 0) if (WIFEXITED (status) ) printf("child %d terminated normally with exit status=%d\n", pid, WEXITSTATUS (status)); else printf("child %d terminated abnormally\n", pid) ; /* The normal termination is if there are no more children */ if (errno != ECHILD) unix_error("waitpid error"); exit(0);

Hope this helps!

You might be interested in
Describe the difference between a myth and a fable.
WINSTONCH [101]

Answer:

A myth is a story about gods and heroes and how the world came into being while a fable is a story about animals, things, and forces of nature that are meant to give a moral lesson. ... “Myth” comes from the Greek word “mythos” meaning “story” while “fable” comes from the Latin word “fabula” meaning “a narrative or tale."

5 0
3 years ago
What is the main purpose of broadcasting via satellite? A. To enable signal reception at night B. To convert analog signals to d
Natali5045456 [20]

Answer:

The answer is "Option C".

Explanation:

Satellite transmission is a content distribution program, that utilizes digital signals to transmit from satellites that receive parabolic antennas widely known as satellite dishes. It's a  low noise block generator for transmitted to cooling. It also allows the user it accepts single in a wide area, and the wrong choice can be defined as follows:

  • In choice a, It allows the uses to receive a signal at all times, that's why it is wrong.
  • In choice b, It provides digital signals,  that's why it is wrong.
  • In choice d, It is wrong because it always provides quality signals.  

 

8 0
3 years ago
Which storage device is not recommended as a permanent storage solution?
Brut [27]

Answer:

In comparison to permanent storage, non-permanent storage, also called volatile memory, is a storage device whose data is lost when its power source is disconnected. Examples of non-permanent storage include CPU cache and RAM.

Explanation:

i just know

8 0
2 years ago
You recently started working part-time in a retail store, and are learning about the reading devices your store uses. Your store
sleet_krkn [62]

Answer:

QR code

Explanation:

QR Code. Short for quick response code, which can also be called 2-D bar code, a QR code is a type of two-dimensional (2D) barcode that are read with the aid of a QR barcode reader or a camera-enabled smartphone with an inbuilt or installed QR reader software.

A QR code is capable of carrying information in both the vertical and the horizontal direction, which is the reason behind the name 2D barcode.

3 0
3 years ago
What type of organizational structure would you want to use for this company (by function, by process, by product, and so on)? E
zhuklara [117]
I would prefer a cotton company because we're all can make cloths.
3 0
3 years ago
Other questions:
  • Janice has a "jammed" key on her keyboard. Every time she strikes the "S" key it sticks and doesn't pop back. What should Janice
    6·2 answers
  • the type() function in python does what when you give it an object. returns the last keystrokes from the user. fill the object w
    9·1 answer
  • Which of the following is a valid variable name? a. salesTax b. input-string c. 25Percent d. double
    8·1 answer
  • Which route of entry could chemicals use to enter through the body’s airways?
    8·1 answer
  • Which of the following is false about arrays? Group of answer choices
    15·1 answer
  • Along a road lies a odd number of stones placed at intervals of 10 metres. These stones have to be assembled around the middle s
    12·1 answer
  • I NEED HELP ASAP
    8·1 answer
  • State and give reason, if the following variables are valid/invalid:
    12·1 answer
  • Which sentence in the passage shows an effective way to protect your document from misuse? Claire has saved her research paper o
    14·1 answer
  • Mention and discuss specific professional ethics related to augmented reality, artificial intelligence, and the internet of thin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!