[net.unix-wizards] Execve

rsm@ut-ngp.UUCP (Robert S. Maier) (05/14/86)

Pardon the following naive question; I'm trying to learn the fine art
of UNIX hacking on my own.

'Ps' reports the names of login shells as if they had a hyphen ("-")
prefix.  E.g., -csh for csh.  Processes started up by the 'adb'
debugger also have their names reported by 'ps' with a hyphen.  I have
used adb to dig into the run-time stack of several such processes, and
have found that the argv[0] strings do indeed contain such hyphens as
prefixes.  I presume that this means that when 'login' and 'adb' use
'execve' to start up a shell, they genuinely precede the shellname by
a hyphen.  My question is, why?  My man page on execve(2) says nothing
about such an option.  Or is there another explanation?

Robert Maier
ARPA: rsm@ngp.utexas.edu / rsm@carl.ma.utexas.edu (.ma. infix is new!)
UUCP: ...{allegra, ihnp4, seismo!ut-sally} ! ut-ngp ! rsm