Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: How to issue a C SHELL command within a C program Message-ID: <13710@smoke.BRL.MIL> Date: 30 Aug 90 20:57:35 GMT References: <3923@auspex.auspex.com> <1990Aug28.214551.6759@gtisqr.uucp> <3985@auspex.auspex.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <3985@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: > if (!sh) > sh = "/bin/sh"; Incidentally, while /bin/sh should always be used to execute commands from a program, when you spawn an interactive subshell you should use the valuse of the SHELL environment variable. Similar for EDITOR and PAGER. Users are much more fussy about their interactive environments and are therefore much more likely to notice if you don't give them their preferences there.