|
|
|
|
|
by LukeShu
2715 days ago
|
|
> I don't think changing argv[0] in the current process will have any effect in the /proc file system. Yes it does. This is a standard trick for changing the process name at runtime, several daemons do this to change the process name of child processes created by fork() that aren't separate executable. For instance, OpenSSH's sshd sets the child-process for a session to "sshd: USERNAME [priv]". `exec -a` lets you set argv[0] through an execve() call, but many times you want to set it without exec'ing a new program. |
|