Xinu7/man/man2/setnok.doc




SETNOK(2)           Xinu Programmer's Manual            SETNOK(2)



NAME
     setnok - set next-of-kin for a specified process

SYNOPSIS
     int setnok(nok, pid)
     int nok;
     int pid;

DESCRIPTION
     _S_e_t_n_o_k sets _n_o_k to be the next-of-kin for process _p_i_d by
     recording _n_o_k in the process table entry for process _p_i_d.  A
     call to _s_e_t_n_o_k overwrites any previous information in the
     process table entry.

     The next-of-kin for a process, _P, is another process, _Q,
     that the system notifies when _P dies (i.e., exits).  Notifi-
     cation consists of a message sent to _Q containing only the
     process id, _P.

     Both arguments to _s_e_t_n_o_k must be valid process ids.  _S_e_t_n_o_k
     returns SYSERR to report errors in its arguments, and OK
     otherwise.

SEE ALSO
     kill(2)

BUGS
     There is no check to ensure that the next-of-kin remains in
     existence between the call to _s_e_t_n_o_k and the termination of
     a process.

























Version 6b               Printed 1/12/87                        1