lkml.org 
[lkml]   [2003]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Changing argv[0] under Linux.
From
Date
On Tue, 14 Jan 2003 21:55:02 GMT, Miquel van Smoorenburg <miquels@cistron.nl>  said:

> If you want to modify argv[0] etc, loop over argv[], count howmuch
> space there is (strlen(argv[0] + 1 + strlen(argv[1] + 1 ... etc)
> and make sure you do NOT write a string longer than that. Also
> make sure that you end the string with a double \0

Or steal the code that's already been done - sendmail and wu-ftpd both have
code to do this....

--
Valdis Kletnieks
Computer Systems Senior Engineer
Virginia Tech

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.178 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site