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
What term is used to identify the visual interface that displays information it receives from the computer?
olga nikolaevna [1]
The answer to this question is A
7 0
3 years ago
Paul is a baker who wants to improve his recipe for muffins because they turn out with a greasy flavor. What ingredient should h
Sergio039 [100]
Butter to Margarine

Cakes baked with butter usually always turns out to be greasy and heavy.

Hope this helps, good luck! (:
3 0
3 years ago
Read 2 more answers
Hi what is full form of ugst​
AURORKA [14]

Answer:

UGST – Union Territory Goods & Services Tax.

4 0
3 years ago
Read 2 more answers
A corporate user is attempting to connect to the company’s Windows domain server on the local network with her new laptop throug
andreev551 [17]

Answer:

B. Windows domain user name and password

Explanation:

Windows domain user name and password are login credentials required for the user to successfully sign in to the Windows domain.

The domain username and password are usually stored on a domain controller rather than on the host.

As a domain user, the computer seeks from the domain controller the privileges assigned to the user, if it gets a positive response from the domain controller, it authorizes the users login credentials without restrictions; else, it denies the user access.

8 0
3 years ago
What are the two basic windows 8 settings for network security?
maks197457 [2]

The two basic windows 8 setting for network security are Public and private network. The private network settings mean that you can link home group and make remote desktop connections. Public network settings entail the greatest privacy. You should make sure file or device sharing is disabled for having data copy.

<span> </span>

 

7 0
3 years ago
Other questions:
  • When a dynamic array with a class for a base type is declared, which constructor is called?
    5·1 answer
  • Which ipv6 header field is known as the priority field?
    10·2 answers
  • When you set the position property for a block element to fixed, the element
    5·1 answer
  • Which encryption standard uses Advanced Encryption Standard (AES), a 128-bit block cipher that is much tougher to crack than the
    7·1 answer
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • Your motherboard supports dual channeling and you currently have two slots populated with DIMMs; each module holds 2 GB. You wan
    6·2 answers
  • What is the IEEE 802 standards name for a wireless network that is limited to one person's workspace?
    14·1 answer
  • No spamming or links
    15·2 answers
  • What is an operating system that controls some aspects of the computer?
    10·2 answers
  • You are the administrator for the ABC Company. You are looking to install Windows Server 2016, and you need to decide which vers
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!