home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!schwager
- From: schwager@mike.cs.uiuc.edu (Mike Schwager)
- Subject: Details regarding the exec command
- Message-ID: <BzH641.L0J@cs.uiuc.edu>
- Sender: news@cs.uiuc.edu
- Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
- Date: Fri, 18 Dec 1992 21:52:49 GMT
- Lines: 29
-
-
-
- Everyone please open their Bibles to page 143... :-)
-
- I'm trying to understand the "exec" call better. I notice on the
- aforementioned page that if I do
-
- $shell = '/bin/csh';
- exec $shell '-sh';
- die "barf\n";
-
- Then the shell believes it is a login shell- ie, $0 must be "-". However,
- if I do this:
-
- exec '/bin/csh' '-sh';
-
- it gives me an error, and if I do this:
-
- exec $shell, '-sh';
-
- it is not a login shell. I don't understand The Book here, nor is it clear
- what a "multi-valued list" is. What exactly is exec'ed in the first
- example? Why does it work, whereas if I explicitly use the string
- '/bin/csh' it fails? Please enlighten me.
- -Mike
- aka, Mike Schwager |"I will never apologize for the United States
- INTERNET:schwager@cs.uiuc.edu | of America, ever. I don't care what the
- Bye, George!!! | facts are." -George Bush
- University of Illinois, Dept. of Comp. Sci., for whom I do not speak
-