[SuSE Linux] How can I get process information ?
Hallo, I have got the following problem: I am porting a ANSI C program from DIGITAL-UNIX to LINUX. One function is checking if a process, which I want to start, is already running. I am doing this check in the following way: I am searching in the /proc filesystem for all files open these files with the system call open and then I perform the syscall ioctl(fd,PIOCPSINFO,&buf) on the open filedescriptor (struct prpsinfo buf). Afterwards I compare the buf.pr_args with the processname and if equal I am using the desired fields set in the buf.pr_pid and buf.pr_ppid. In my SUSE LINUX Ver. 5.2 I do not have the structure prpsinfo, neither the constant PIOCPSINFO. Even more the /proc filesystem on the alpha looks different from the /proc filesystem in LINUX. How should I solve the problem ? Is there a more platform independent way to solve this problem ? Send your response please to: andreas_fasl@yahoo.com Thanks a lot and best regards, Andreas Fasl _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at <A HREF="http://mail.yahoo.com"><A HREF="http://mail.yahoo.com</A">http://mail.yahoo.com</A</A>> - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (1)
-
andreas_fasl@yahoo.com