home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.questions:10579 comp.lang.c:13031
- Newsgroups: comp.unix.questions,comp.lang.c
- Path: sparky!uunet!infonode!henders
- From: henders@infonode.ingr.com (Greg Henderson)
- Subject: 'system' call uses 'sh'... Can I change this??
- Message-ID: <1992Aug31.203936.20409@infonode.ingr.com>
- Summary: Want to change system call from using sh to something else.
- Keywords: system sh
- Organization: Intergraph Corporation, Huntsville, AL.
- Distribution: comp
- Date: Mon, 31 Aug 1992 20:39:36 GMT
- Lines: 38
-
-
- Hopefully someone has run across a way to work around this...
-
- Take this simple program -->
-
- main(int argc, char *argv[])
- {
- char str[100];
- printf ("enter shell command:");
- gets (str);
- system (str);
- }
-
- and I call it g.c and do this ->
-
- $ make g
- acc -O g.c -o g
- $ g
- enter shell command:sleep 100
-
-
- and on another window I check my process listing -->
-
- greg 26973 26970 0 08:06:57 ttyp0 0:03 -ksh
- greg 27786 26973 0 15:27:26 ttyp0 0:00 g
- greg 27787 27786 0 15:27:31 ttyp0 0:00 sh -c sleep 100
- greg 27788 27787 0 15:27:31 ttyp0 0:00 sleep 100
-
-
- Does anyone know a way to get the system call to use a different shell
- than 'sh'? like maybe 'ksh'...
-
-
- --
-
- Greg Henderson henders@infonode.ingr.com ...uunet!ingr!infonode!henders
-
-
-