Hello!
On Mon, 8 Jun 1998, Massimo Dal Zotto wrote:
> > This worked under BSDI, because if you say argv[1] = "test", and argc is
> > at least 2, it shows "test" in ps. If argc is only one (they didn't use
> > any args), it will not show it, but I have added a nifty hack to the
> > postmaster to re-exec it so it is sure to have a least three args. I
> > strip them off before processing. You can see the patch in the patches
> > list.
>
> I believe, this won't work under Linux. I'm not 100% sure about it but from
> what I can remember Linux pass a copy of the original argv to the program
> and changing it doesn't change the argv strings shown by ps. You must zap
> the strings itself inside the page allocated for argv.
> I would suggest the following code which works fine also under linux, even
> with zero args.
AFAIK the only "portable" way is to steal copy from well-known sendmail
hacks...
Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.