Le mardi 9 novembre 2010 13:31:03, Bastien ROUCARIES a écrit : Bruce could you try the following program under HPUX ? It will print the program name (i put the following code in public domain if copyrightable I do not think it is)
Bastien #include <sys/param.h> #include <sys/pstat.h> #include <sys/unistd.h> int main() { struct pst_status pst; int target = (int)getppid(); if (pstat_getproc(&pst, sizeof(pst), (size_t)0, target) != -1) (void)printf("Program name is %s",pst.pst_ucomm); else perror("pstat_getproc"); return 0; } > > It will also allow to use the pstat command under hpux > (http://docs.hp.com/en/B2355-90682/pstat.2.html) pst_ucomm field is the > name of the program. > > Bastien