system (and mkdir)
Richard A. O'Keefe
ok at quintus.UUCP
Sun Jan 24 12:22:42 AEST 1988
In article <447 at cpsc6b.cpsc6a.att.com>,
crs at 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.
More information about the Comp.lang.c
mailing list