Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: system (and mkdir) Message-ID: <569@cresswell.quintus.UUCP> Date: 24 Jan 88 02:22:42 GMT References: <127@dcrbg1.UUCP> <9472@ccicpg.UUCP> <2771@cbdkc1.ATT.COM> <447@cpsc6b.cpsc6a.att.com> Organization: Quintus Computer Systems, Mountain View, CA Lines: 13 Keywords: c program Summary: exec("a shell script") In article <447@cpsc6b.cpsc6a.att.com>, crs@cpsc6b.cpsc6a.att.com (Chris (I'm Outta Here!) Seaman) writes that: > But, if their command is a shell > script, exec() will fail. A script must be exec'ed as an argument > to the appropriate shell (/bin/sh, /bin/csh, /bin/ksh, etc.). BSD UNIX doesn't have this restriction; that is a System V "feature". Which is, of course, the point of system(): the fork/exec approach isn't exactly the same in all versions of UNIX. system() fits nicely with popen() too. {Why isn't there a popen() which gives me *two* stdio streams, one to each end of the command?} This is more appropriate for comp.unix.questions.