must be done on sun Solaris using c languge some implementations of unix such as sun solaris 2 provide a proc filesystem which maps the image of each process in the system to a file in the /proc [url removed, login to view] process has a corresponding file named by its process ID. look at the man page on proc .it has all the details. 1-Write a function get_prstatus which has the prototype int get_prstatus(int pid , prstatus_t *sp) the get_prstatus sets the prstatus_t structure pointed to by sp for the process with process ID pid the function return 0 on success and -1 [url removed, login to view] outline of the get_prstatus producer is *Open /proc/pid for read only *Execute the system call ioctl(fildes,code,s)with code equal to PIOCSTATUS and s being a pointer to a prstatus_t structure *Close the file check for errors on each of the system calls in get_prstatus .do not exit from the function on error--return an error code .be sure to close open file--even if returning an error. 2_ write the function output_prstatus with prototype int output_prstatus(FILE *fp,prstatus_t s ); the output prstatus_t functions writes the contents of s in an easily readable format to the file fp do not worry about the members of type sigset_t.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2)steps for running the program.
i wiil run it on ssh secure shell client . xp,melinum,nt,2000