Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!amdcad!tim From: tim@amdcad.UUCP Newsgroups: comp.os.minix Subject: No SIGCLD? Message-ID: <14675@amdcad.UUCP> Date: Sun, 8-Feb-87 18:39:50 EST Article-I.D.: amdcad.14675 Posted: Sun Feb 8 18:39:50 1987 Date-Received: Mon, 9-Feb-87 04:43:18 EST Organization: AMDCAD, Sunnyvale, CA Lines: 31 Keywords: wait(), shell background jobs I haven't gotten an answer to my previous question about object file formats, but I have another one regarding signals in minix. In all of the discussions of signals supported in minix, I cannot find SIGCLD (death of child) mentioned. In fact, the code for exit() and wait() in the memory manager implies that the resources for a child are not released until the parent does an explicit wait() for the child (or the parent is killed, in which case the child is inherited by init). Without SIGCLD, there may be problems in implementing background jobs in shells. If we type cc -o foo foo.c & we don't want the shell to wait() for the compilation to complete. However, when the compile completes, it sits in the zombie state (HANGING) forever, using a process slot (and memory resources, too!). This problem is solved in UN*X systems by notifying the shell when a child exit()'s through the SIGCLD signal. If this signal is caught, the signal handler can perform the wait() (which immediately returns with a zombie) and free up the child's resources. [A good description of this problem is found in M. Bach's book "The Design of the UNIX Operating System" on page 216] How do shells in minix get around this problem with no SIGCLD? Tim Olson Advanced Micro Devices (tim@amdcad)