From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,ee49ad89dc476c55 X-Google-Attributes: gid111c93,public From: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) Subject: Re: DEC-UNIX "system" does not work on Linux? Date: 1997/11/12 Message-ID: <64cg3d$h5k$1@news.cs.tu-berlin.de>#1/1 X-Deja-AN: 288938246 Distribution: world References: <64c99q$9tf$1@news.cs.tu-berlin.de> <64b8qe$rc7@news2.zippo.com> <64al82$5m5$1@news.cs.tu-berlin.de> Organization: Technical University of Berlin, Germany Reply-To: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) Newsgroups: comp.os.linux.alpha In article <64c99q$9tf$1@news.cs.tu-berlin.de>, bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) writes: > In article <64b8qe$rc7@news2.zippo.com>, lindahl@pbm.com (Greg Lindahl) writes: > > bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns) writes: > > > > > Everything works fine, the program runs.... except: > > > The program wants to start another program with system("command") > > > This does not work. > > > > I have not tried this. Here's how you debug it, though: > > > > strace -f ./program_name > > > > That shows you your system calls and results. The problem ought to be > > visible... > > > > -- g > > That was a good advice: > The system call that the program wants to execute was: > system("double.gdfidl -noQ -noroQ .....") > > In the output of "strace" I identify: > > [pid 3188] access("/usr/bin/sh", X_OK) = -1 ENOENT (No such file or directory) > [pid 3188] execve("/sbin/sh", ["sh", "-c", "double.gdfidl -noQ > -noroQ"...], [/* 80 vars */]) = -1 ENOENT (No such file or directory) > > On DEC-UNIX, the shells "/usr/bin/sh" and "/sbin/sh" both exist. > ON DEC-Linux, the shells both don't exist. > > I will ask the system administrator to make a link > from "/sbin/sh" to the Linux default shell. > > I will post the outcome. > > Warner Bruns I did not ask the sysadmin to make a link, but edited the executable with a hex-editor. I replaced "/sbin/sh" with "/bin/sh" (zero appended). Now the program runs. Thanks a lot Warner Bruns