bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libposix stuff


From: Bastien ROUCARIES
Subject: Re: libposix stuff
Date: Mon, 22 Nov 2010 13:02:15 +0100

Dear bruce,

Have you tested the previous program ?

Bastien



On Mon, Nov 15, 2010 at 12:41 PM, Bastien ROUCARIES
<address@hidden> wrote:
> 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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]