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
True of False - use T or F An abstract class can have instances created using the constructor of the class.
Sindrei [870]

Answer:

False

Explanation:

An instance of an abstract class cannot be created through the constructor of the class, because it does not have a complete implementation. Though, it is possible to have references of an abstract type class. Abstract classes are incomplete structures and you would have to build onto it before you are able to use it.

7 0
4 years ago
This is gonna be very long but I have no idea what to do, I'm confused.
kaheart [24]

for such experiment, you do it with care and to acquire and determine to put experience in it

Explanation:

because without you been or using experience the experiment will not correct

8 0
3 years ago
How can you create a safe and secure password? Choose a password unassociated with your personal history. Choose the same passwo
Simora [160]

Answer:

sudoors787389

Explanation:

in other to get more secured password a combination of password like this will be more secured (sudoors787389)

8 0
3 years ago
Can someone help me with music? it's mostly about texture
umka2103 [35]
Texture on da guyz so you can absolute value into the possible
8 0
3 years ago
Data mining is Group of answer choices a specialized type of program that is used in the mining industry creating a database war
yulyashka [42]

Answer:

finding and extracting hidden predictive information from the data in large databases.

5 0
3 years ago
Other questions:
  • As the network administrator for a growing company, you’re asked to solve a remote access dilemma. The 12 employees who work fro
    6·1 answer
  • Websites using www showed up on the internet for the first time in -992
    9·1 answer
  • How to make a sad face on keyboard using alt?
    5·2 answers
  • What are operational databases
    12·1 answer
  • How many typefaces should you use in business documents?
    9·2 answers
  • _______ _____ is the process of creating usable computer pograms and applications and the theories behind those processes. Quest
    13·2 answers
  • Who is the CEO of Tesla.​
    11·2 answers
  • The Coffee Counter charges ​$7.00 per pound for Kenyan French Roast coffee and ​$11.00 per pound for Sumatran coffee. How much o
    8·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
    12·1 answer
  • write pseudocode to represent the logic of a program that allows the user to enter two values. The program outputs the sum of an
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!