[This question is for UNIX/Linux users.] Use function fork to spawn a child and let the child exit without leaving an entry in the process table.
What will be an ideal response?
```
#!/usr/local/bin/python
import os
import signal
import time
import sys
pid = os.fork() # create child
signal.signal( signal.SIGCHLD, signal.SIG_IGN ) # ignore sigchld
if pid != 0: # parent
time.sleep( 1 )
print "Child should be removed already from process table"
elif pid == 0: # child
time.sleep( 0.5 )
print "Child exiting..."
else: # could not create child
sys.exit( "Error forking child." )
```
Child exiting...
Child should be removed already from process table
You might also like to view...
Discuss the implementation issues associated with replication.
What will be an ideal response?
Select the three most common methods of organizing websites.
a. horizontal, vertical, and diagonal b. hierarchical, linear, and random c. accessible, readable, maintainable d. none of the above
There are three absolute value functions defined in various header files. These are abs, fabs, and labs. Write a template function that subsumes all three of these functions into one template function.
What will be an ideal response?
To update data in a table, you must be in Edit mode
Indicate whether the statement is true or false