3 ms·
The command line version of exec offers "-a name", and the various library/syscall forms allow you to specify argv[0] separately from the path of the binary to
by tyingq 4y ago
The command line version of exec offers "-a name", and the various library/syscall forms allow you to specify argv[0] separately from the path of the binary to exec.
You can set it yourself within a running program as well, like:
perl -e '$0="testme";while(1){sleep 1}' &
ps -ef | grep testme