Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

baby(1) [linux man page]

BABY(1)                                                       General Commands Manual                                                      BABY(1)

NAME
baby -- create new process from two parents SYNOPSIS
baby -sex [m|f] [-name name] DESCRIPTION
baby is initiated when one parent process polls another server process through a socket connection in the BSD version or through pipes in the System V implementation. baby runs at low priority for approximately forty weeks and then terminates with a heavy system load. Most systems require constant monitoring when baby reaches its final stages of execution. Older implementations of baby did not require both initiating processes to be present at the time of completion. In those versions the initiating process which was not present was awakened and notified of the results upon completion. It has since been determined that the presence of both parent processes result in a generally lower system load at completion, and thus current versions of baby expect both par- ent processes to be active during the final stages. Successful completion of baby results in the creation and naming of a new process. Parent processes then broadcast messages to all other processes, local and remote, informing them of their new status. OPTIONS
-sex define the gender of the created process -name assign the name name to the new process EXAMPLES
baby -sex f -name Jacqueline completed successfully on July 9, 1992 at 9:11pm. Jacqueline's vital statistics: 8 pounds 3 oz, 20 inches, long dark hair. The parent process, Kim Dunbar, is reportedly doing fine. SEE ALSO
cigar(6), dump(5), cry(3). BUGS
Despite its complexity, baby only knows one signal, SIGCHLD, (or SIGCLD in the System V implementation), which it uses to contact the par- ent processes. One or both parent processes must then inspect the baby process to determine the cause of the signal. The sleep(1) command may not work as expected on either parent process for some time afterward, as each new instance of baby sends inter- mittent signals to the parent processes which must be handled by the parents immediately. A baby process will frequently dump core, requiring either or both parent processes to clean up after it. Despite the reams of available documentation on invoking and maintaining baby, most parent processes are overwhelmed. AUTHORS
From a man page by Joe Beck, <beck@cs.ualberta.ca>. BABY(1)

Check Out this Related Man Page

FORK(2) 						      BSD System Calls Manual							   FORK(2)

NAME
fork -- create a new process LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> pid_t fork(void); DESCRIPTION
fork() causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process) except for the following: o The child process has a unique process ID. o The child process has a different parent process ID (i.e., the process ID of the parent process). o The child process has its own copy of the parent's descriptors. These descriptors reference the same underlying objects, so that, for instance, file pointers in file objects are shared between the child and the parent, so that an lseek(2) on a descriptor in the child process can affect a subsequent read(2) or write(2) by the parent. This descriptor copying is also used by the shell to establish standard input and output for newly created processes as well as to set up pipes. o The child process' resource utilizations are set to 0; see setrlimit(2). In general, the child process should call _exit(2) rather than exit(3). Otherwise, any stdio buffers that exist both in the parent and child will be flushed twice. Similarly, _exit(2) should be used to prevent atexit(3) routines from being called twice (once in the parent and once in the child). In case of a threaded program, only the thread calling fork() is still running in the child processes. Child processes of a threaded program have additional restrictions, a child must only call functions that are async-signal-safe. Very few functions are asynchronously safe and applications should make sure they call exec(3) as soon as possible. RETURN VALUES
Upon successful completion, fork() returns a value of 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent process, no child process is created, and the global variable errno is set to indicate the error. ERRORS
fork() will fail and no child process will be created if: [EAGAIN] The system-imposed limit on the total number of processes under execution would be exceeded. This limit is configuration-depen- dent. [EAGAIN] The limit RLIMIT_NPROC on the total number of processes under execution by this user id would be exceeded. [ENOMEM] There is insufficient swap space for the new process. SEE ALSO
execve(2), setrlimit(2), vfork(2), wait(2), pthread_atfork(3) STANDARDS
The fork() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
A fork() system call appeared in Version 6 AT&T UNIX. BSD
June 10, 2004 BSD
Man Page