Need help in getting the process name based on the pid in aix
问题 I need to write a C program in AIX environment which will give me the process name. I can get the pid but not the process name based on the pid. Any specific system calls available in aix environment?? Thanks 回答1: getprocs is likely what you want. I created this under AIX 5.x. I have a little routine that cycles thru all processes and dumps their information. while ((numproc = getprocs(pinfo, sizeof(struct procsinfo), NULL, 0, &index, MAXPROCS)) > 0 ) { for (i = 0;i < numproc; i++) { /* skip