home *** CD-ROM | disk | FTP | other *** search
- /* unixtest.c (c) Copyright 1990 H.Rogers */
-
- /* This program displays the UNIX environment. */
- /* For full information on these functions, read the appropriate entries
- * in sections 2 and 3 of the UNIX Programmer's Manual. */
-
- #include <stdio.h> /* standard I/O */
-
- #include "unistd.h" /* UNIX system calls */
-
- int
- main ()
- {
- printf ("process group: %d\n\n", getpgrp ());
- printf ("pid: %-3d ppid: %-3d\n\n", getpid (), getppid ());
- printf ("uid: %-3d gid: %-3d\n", getuid (), getgid ());
- printf ("euid: %-3d egid: %-3d\n\n", geteuid (), getegid ());
- printf ("login: %s\n", getlogin ());
- return 0;
- }
-