[comp.sys.hp] program can't change argv0

joe@bwdlh111.BNR.CA (Joe Waddington) (11/23/90)

I hope someone out there can help me.

I am running HP-UX 7.0 on an HP 9000/345.  I wrote and compiled the 
following C-program hoping it would change the name that I saw when 
I type 'ps -ef'.  It works under HP-UX 6.5 and SunOS4.0.3 and SunOS 
4.1.1.

any help you can give would be greatly appreciated.

Thanks
Joe


----------------------------cut here-----------------------------
#include <stdio.h>

main( argc, argv )
int argc;
char **argv;
{
char *p;

fprintf( stdout, "prog_name is :%s.\n",argv[0]);
p = argv[0];
*p++ = 'p';
*p++ = 'p';
*p++ = 'p';
fprintf( stdout, "prog_name is :%s.\n",argv[0]);

}
----------------------------cut here-----------------------------

=============================================================
Please remember that these opinions are mine, and mine alone.
      (a fact I'm not always proud to admit. :-) )  
=============================================================
Joe Waddington       joe@bnr.ca        Bell Northern Research
=============================================================