home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / unixlib / !UnixLib / test / c / unixtest < prev    next >
Encoding:
Text File  |  1994-03-08  |  617 b   |  21 lines

  1. /* unixtest.c (c) Copyright 1990 H.Rogers */
  2.  
  3. /* This program displays the UNIX environment. */
  4. /* For full information on these functions, read the appropriate entries
  5.  * in sections 2 and 3 of the UNIX Programmer's Manual. */
  6.  
  7. #include <stdio.h>        /* standard I/O */
  8.  
  9. #include "unistd.h"        /* UNIX system calls */
  10.  
  11. int
  12. main ()
  13. {
  14.   printf ("process group: %d\n\n", getpgrp ());
  15.   printf ("pid:  %-3d ppid: %-3d\n\n", getpid (), getppid ());
  16.   printf ("uid:  %-3d gid:  %-3d\n", getuid (), getgid ());
  17.   printf ("euid: %-3d egid: %-3d\n\n", geteuid (), getegid ());
  18.   printf ("login: %s\n", getlogin ());
  19.   return 0;
  20. }
  21.