4.4BSD/usr/share/man/cat2/setpgid.0

Compare this file to the similar file:
Show the results in this format:

SETPGID(2)                  BSD Programmer's Manual                 SETPGID(2)

NNAAMMEE
     sseettppggiidd, sseettppggrrpp - set process group

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<uunniissttdd..hh>>

     _i_n_t
     sseettppggiidd(_p_i_d___t_p_i_d, _p_i_d___t_p_g_r_p);

     _i_n_t
     sseettppggrrpp(_p_i_d___t_p_i_d, _p_i_d___t_p_g_r_p);

DDEESSCCRRIIPPTTIIOONN
     SSeettppggiidd() sets the process group of the specified process _p_i_d to the
     specified _p_g_r_p. If _p_i_d is zero, then the call applies to the current pro-
     cess.

     If the invoker is not the super-user, then the affected process must have
     the same effective user-id as the invoker or be a descendant of the in-
     voking process.

RREETTUURRNN VVAALLUUEESS
     SSeettppggiidd() returns 0 when the operation was successful.  If the request
     failed, -1 is returned and the global variable _e_r_r_n_o indicates the rea-
     son.

EERRRROORRSS
     SSeettppggiidd() will fail and the process group will not be altered if:

     [ESRCH]
             The requested process does not exist.

     [EPERM]
             The effective user ID of the requested process is different from
             that of the caller and the process is not a descendent of the
             calling process.

SSEEEE AALLSSOO
     getpgrp(2)

SSTTAANNDDAARRDDSS
     SSeettppggiidd() conforms to IEEE Std 1003.1-1988 (``POSIX'').

CCOOMMPPAATTIIBBIILLIITTYY
     SSeettppggrrpp() is identical to sseettppggiidd(), and is retained for calling conven-
     tion compatibility with historical versions of BSD.

4th Berkeley Distribution        June 4, 1993                                1