MC logo
CSc 422 Assignment 1
[^] CSc 422 Home
[CSc 422 Assignment 1] [CSc 422 Assignment 2] [CSc 422 Assignment 3] [CSc 422 Assignment 4]
[Get Some Unix] [Using Emacs on Sandbox]

Process Parms

Sept 5
Sept 19
25 pts

We'll be working some in a Unix environment this semester, at least through process creation. So this is a very simple get-started assignment. Create a Unix or Linux program that runs and prints out its process id, its parent process id, its owner user id and its owner group id. Like this:

[bennet@m-mcc-csc-01456 asst]$ ./procstuff
       My process ID: 4143
My parent process ID: 3696
  My owner's user id: 1000
 My owner's group id: 1000
Each of these data are supplied by library calls (that ultimately perform system calls). In order, getpid, getppid, getuid, and getgid. They are documented by running the man command on a Unix system (Sandbox works fine). Googling them works pretty well, too. You may compile your program as plain C or C++, as you like.

You are welcome to install Linux or BSD on your own equipment, or use the Sandbox server. If you need Sandbox credentials or a password change, drop by or email me.

When your program works correctly and looks nice, submit it here.