Back to index

glibc  2.9
Functions
getpgid.c File Reference
#include <errno.h>
#include <unistd.h>
#include <hurd.h>
#include <hurd/port.h>

Go to the source code of this file.

Functions

int __getpgid (pid_t pid)

Function Documentation

int __getpgid ( pid_t  pid)

Definition at line 26 of file getpgid.c.

{
  error_t err;
  pid_t pgrp;

  if (pid == 0)
    {
      /* Assume atomic word fetch and store, so don't lock _hurd_pid_lock.  */
      pgrp = _hurd_pgrp;
      err = 0;
    }
  else
    err = __USEPORT (PROC, __proc_getpgrp (port, pid, &pgrp));

  return err ? __hurd_fail (err) : pgrp;
}

Here is the call graph for this function: