PS - What does -ksh mean?
mike.stefanik
mike at bria.UUCP
Sun May 26 03:59:30 AEST 1991
In an article, moore at emily.uvm.edu (Bryan Moore) writes:
>What does the - sign mean in front of sh and ksh?
This means that it is a login shell. Traditionally, the way that UNIX
shells "know" that they are login shells (thus, they execute /etc/profile
and ~/.profile, etc.) is they are invoked as such:
execl("/bin/sh","-sh",NULL);
The first argument to execl() is the name of the image to execute, the
second argument is argv[0], and so on. When you get a process status,
it'll show argv[0], which has the dash (which makes it easy to tell the
difference between the login shell and subshells)
--
Michael Stefanik, MGI Inc, Los Angeles | Opinions stated are never realistic
Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
If MS-DOS didn't exist, who would UNIX programmers have to make fun of?
More information about the Comp.unix.aix
mailing list