Xref: utzoo comp.unix.aix:5320 comp.sys.ibm.pc.rt:2172 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!bria!mike From: mike@bria.UUCP (mike.stefanik) Newsgroups: comp.unix.aix,comp.sys.ibm.pc.rt Subject: Re: PS - What does -ksh mean? Message-ID: <269@bria.UUCP> Date: 25 May 91 17:59:30 GMT References: <1991May24.200050.16644@uvm.edu> Reply-To: uunet!bria!mike Followup-To: comp.unix.aix Organization: MGI Group International, Los Angeles, CA Lines: 19 In an article, moore@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?