I tried digging up some information on using the C procfs API I'll let
you
know what I dig up.
Ok, I'd like to know the output of the following program from as many
different flavours of UNIX as possible. I've tested it on Solaris and
OSF1. They seem to mildly disagree on the string that appears after
invocation = in the output: Solaris prints the entire argument list
starting from argv[0] (but the cool thing is that it will let you know
what argc and argv for the program are), whereas OSF1 only seems to
display argv[0] here.
Other than that, I got the impression, from reading through some
documentation, that this is standard across different flavours of UNIX. I
initially tried it on Solaris, and it worked on OSF when I removed argc
amd argv.