From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,ee49ad89dc476c55,start X-Google-Attributes: gid111c93,public From: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) Subject: DEC-UNIX "system" does not work on Linux? Date: 1997/11/11 Message-ID: <64al82$5m5$1@news.cs.tu-berlin.de>#1/1 X-Deja-AN: 288708138 Distribution: world Organization: Technical University of Berlin, Germany Reply-To: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) Newsgroups: comp.os.linux.alpha Dear Netters: I am porting a finite difference code written in Fortran to an Alpha running Linux. Since there is no good Fortran-compiler on this machine, i compile on a DEC-UNIX machine and transfer the executable to DEC-Linux (thanks to this newsgroup, i know how to do this). Everything works fine, the program runs.... except: The program wants to start another program with system("command") This does not work. Even the following little test-program, if compiled on a DEC-UNIX system and transferred to the DEC-Linux does not work as expected: #include #include main(){ int ierr; ierr= system("ls -l"); printf(" ierr: %d\n", ierr); } On the DEC-UNIX, i see the directory listing, ierr is 0. On the DEC-Linux, i dont see the directory, ierr is 32512. Does anybody out there know a work around for "system()", that can be compiled on DEC-UNIX and executed on DEC-Linux? If that helps: According to the DEC-UNIX man pages, system makes a fork, the child process then exec's "/bin/sh". This "/bin/sh" on the target DEC-Linux is a link to "bash". Thanks for any suggestions. Warner Bruns