Return to BSD News archive
Xref: sserve comp.unix.solaris:24054 comp.unix.unixware:11585 comp.unix.bsd:14973 comp.unix.misc:14128 comp.unix.programmer:20402 comp.unix.questions:55702 comp.unix.sys5.misc:646 comp.unix.sys5.r3:2191 comp.unix.sys5.r4:8428 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!cs.utexas.edu!uunet!newsflash.concordia.ca!nstn.ns.ca!cs.dal.ca!afton.cs.dal.ca!edemaine From: edemaine@afton.cs.dal.ca (Erik Demaine) Subject: exec() doesn't work with Fortran prog Message-ID: <Cwv7Is.1BF@cs.dal.ca> Sender: usenet@cs.dal.ca (USENET News) Nntp-Posting-Host: afton.cs.dal.ca Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada X-Newsreader: TIN [version 1.2 PL2] Date: Thu, 29 Sep 1994 00:18:27 GMT Lines: 46 Hello, Basic problem: I can't execl() a file compiled with f77. More expanded: I have a program main () { execl ("prog2", (char *) 0); } that should execute the program "prog2". If I make prog2.c like: main () { printf ("hi\n"); } Then compiling this and running the first program will give the result "hi". However, when I try the equivalent from Fortran: program test print *,'hi' stop end I get a segmentation fault when I run the first program. I can run prog2 on its own. System information: I have tried this on both a Solaris and SunOS operating system, running SunSPARCs. Any suggestions? Thanks, 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.