News for hackers. Stuff that matters.
Re:Unix's special way of marking login shells goes back to V... by tyingq on Sunday December 11, 2022 @08:43AM (#33943091)
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

There are no comments on this comment yet.