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
After you set a pin for a domain account on your laptop, that pin can be used only on your laptop. question 17 options:
pogonyaev
This is TRUE

Assume you want to use a PIN LOCK on your Microsoft Account; you can do this without routinely using the account password in your windows machine. A PIN can only be used to unlock the device you activate it on. 

Thus, if someone steals the PIN you used to unlock your laptop with, they will have access to only that one laptop and not your entire Microsoft account. This PIN should only work to the device you set it up on and not to any other devices.






7 0
3 years ago
Write the translator of third generation language​
Licemer1 [7]

Answer:

Examples of common and historical third-generation programming languages are ALGOL, BASIC, C, COBOL, Fortran, Java, and Pascal.

Explanation:

A third-generation programming language (3GL) is a high-level computer programming language that tends to be more machine-independent and programmer-friendly than the machine code of the first-generation and assembly languages of the second-generation, while having a less specific focus to the fourth and fifth generations. Examples of common and historical third-generation programming languages are ALGOL, BASIC, C, COBOL, Fortran, Java, and Pascal.

6 0
2 years ago
What acts as a platform on which application software runs?
Readme [11.4K]
A computing platform
5 0
3 years ago
Elena is used to kissing her friends on both cheeks as a form of greeting in her native country. She notices that her new friend
Veseljchak [2.6K]

Answer:

c. Norms.

Explanation:

When Elena noticed her friend getting uncomfortable when she kisses him on the cheeks as a form of greeting she was violating his norms.

Norms are something that is standard or typical.

In USA there they not used to kiss on the cheeks to greet their friends there would be some other norm of greeting someone.

5 0
3 years ago
10. What is "bandwidth"? (
natali 33 [55]

Answer:

ELECTRONICS

a range of frequencies within a given band, in particular that used for transmitting a signal.

2.

the energy or mental capacity required to deal with a situation.

Explanation:

6 0
3 years ago
Other questions:
  • Please look at picture
    10·2 answers
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • Please help me I just bought a camera and I really wanna shoot in manual mode but I have like the basics down Shutter speed is l
    9·1 answer
  • What does rwd stand for?
    8·2 answers
  • Which of these is a social consequence of effective communication
    12·1 answer
  • Which behavior of the application should the user expect? A user profile has login hour restrictions set to Monday through Frida
    12·1 answer
  • So I was looking at my profile and it says i'm a brainly PLUS member didn't sign up for it tho. Any ideas why this could have ha
    14·2 answers
  • Which one is the answer for the question.
    11·1 answer
  • The printer prints 16 pages every minute. How many pages are printed in 6 minutes?
    14·2 answers
  • how risk can impact each of the seven domains of a typical IT infrastructure: User, Workstation, Local Area Network (LAN), Local
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!