*BSD News Article 36285


Return to BSD News archive

Xref: sserve comp.unix.solaris:24090 comp.unix.unixware:11602 comp.unix.bsd:14975 comp.unix.misc:14141 comp.unix.programmer:20412 comp.unix.questions:55737 comp.unix.sys5.misc:647 comp.unix.sys5.r3:2193 comp.unix.sys5.r4:8430
Newsgroups: comp.unix.solaris,comp.unix.unixware,comp.unix.bsd,comp.unix.misc,comp.unix.programmer,comp.unix.questions,comp.unix.sys5.misc,comp.unix.sys5.r3,comp.unix.sys5.r4
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!swrinde!emory!nntp.msstate.edu!olivea!uunet!newsflash.concordia.ca!nstn.ns.ca!cs.dal.ca!ug!edemaine
From: edemaine@ug.cs.dal.ca (Erik Demaine)
Subject: Re: exec() doesn't work with Fortran prog
Message-ID: <Cww0G8.6BA@cs.dal.ca>
Followup-To: comp.unix.solaris,comp.unix.unixware,comp.unix.bsd,comp.unix.misc,comp.unix.programmer,comp.unix.questions,comp.unix.sys5.misc,comp.unix.sys5.r3,comp.unix.sys5.r4
Sender: usenet@cs.dal.ca (USENET News)
Nntp-Posting-Host: ug.cs.dal.ca
Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
X-Newsreader: TIN [version 1.2 PL2]
References: <Cwv7Is.1BF@cs.dal.ca>
Date: Thu, 29 Sep 1994 10:43:18 GMT
Lines: 20

Erik Demaine (edemaine@afton.cs.dal.ca) wrote:
: Basic problem: I can't execl() a file compiled with f77.

: 	   execl ("prog2", (char *) 0);

Hello again,

Hmm, I feel a bit stupid here -- it is just lucky the C program did not crash.
What I needed was
        execl ("prog2", "prog2", (char *) 0);
That is, the program needed an argv[0] as the name of the program. Aparantly
Fortran is very dependant on this, and that is why it seg-faulted.

Thanks to Daniel R. Kegel who gave the suggestion!

Erik
--
Erik Demaine        || edemaine@ug.cs.dal.ca  || edemaine@fx2800.dal.ca
edemaine@cs.dal.ca  || 01ERIK@ac.dal.ca       || edemaine@is.dal.ca
TRIVIA: Lifesavers are made with holes so if you choked on one you can breath.