Path: utzoo!attcan!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.unix.wizards Subject: Re: What is a good way to do general execs? Message-ID: <790@mwtech.UUCP> Date: 8 Jun 90 18:43:59 GMT References: <438@mtndew.UUCP> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 19 Followup-To: In article <438@mtndew.UUCP> friedl@mtndew.UUCP (Stephen J. Friedl) writes: [needs to exec a user supplied program, but has to avoid "system"] > Execv works great if I'm running a binary, but it doesn't >like to run shell scripts directly (this is Sys V). To get around >this I try the following: Use "execvp". The "p" stands not only for pathname search, but also will invoke a shell if the supplied program is in reality a script. Eventually you may want to set PATH with `putenv' to make execvp search the desired directories (only). Small flame concerning choice of groups: How about a *first* try with comp.unix.questions - you can have allways a second try with c.u.w, but experience shows you may well receive the attention of a wizard in c.u.q. At most make a crosspost but leave followups to c.u.q. I felt tempted to redirect followups, but as I don't appreciate to have threads pop up "out of nothing" I left it here. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83