home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!world!ksr!jfw
- From: jfw@ksr.com (John F. Woods)
- Newsgroups: comp.lang.c
- Subject: Re: why execve() call wouldn't return to the calling program?
- Keywords: execve, unix, process
- Message-ID: <15277@ksr.com>
- Date: 28 Aug 92 13:23:01 EDT
- References: <ih96.714953457@sol.acs.unt.edu>
- Sender: news@ksr.com
- Lines: 17
-
- ih96@sol.acs.unt.edu (Yu Zhi) writes:
- >Hi there. I got a question. I'm working under unix and have some fortran
- >program which I would like to call over and over again. So I decided to
- >write a c program and use execve() calls. But one thing made me mad is that
- >after the call of execl(), the control won't retrun to the c calling program.
- >I'm sure there some way to around this.
-
- The easiest way around it is to ensure that the program you call with execl()
- does not exist, thus enabling execl() to return to your program with an error
- code.
-
- execl() is *supposed* to work the way you see. It *replaces* the current
- process image with a new program.
-
- It sounds like what you really want is "system()" (check your friendly
- neighborhood manual set).
-
-