[Top][All Lists]
[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
>
- Re: error.c has an unnecessary dependency on "program_name", (continued)
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Gary V. Vaughan, 2010/11/08
- Re: libposix stuff, Ralf Wildenhues, 2010/11/08
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Eric Blake, 2010/11/08
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Thien-Thi Nguyen, 2010/11/09
- Re: libposix stuff, Bastien ROUCARIES, 2010/11/09
- Re: libposix stuff, Bastien ROUCARIES, 2010/11/15
- Re: libposix stuff,
Bastien ROUCARIES <=