[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: works under Red Hat, not Debian



Britton <fsblk@aurora.alaska.edu> writes:

> I have made myself an executable octave script called octave_test.mex and
> made it executable with chmodand the #!/interpreterpath mechanism.  On
> both Red Hat and Debian, typing ./octave_test.mex runs the script as
> expected.  I made also a c code wrapper for this program, so as to obey
> the letter of the law in one of my classes if not the spirit.  The wrapper
> looks like this: 
> 
> #include <unistd.h>
> 
> main()
> {
>   execl("/home/Gandalf/octave_test.mex",
>                     (void *) 0);
> }
> 

Well, on my debian system, something very similar to this works just
fine - tell me, what version of libc are you using on your debian
machine, and what's in use at school?  (On my system, I'm using
5.4.33) I remember running into a similar problem on an old slackware
system - it was libc5, too, but a much earlier version.  (this could
also be a kernel version issue - I'm not certain who would handle
this - I'm using 2.0.30) The problem is that you're passing no arguments to
octave_test.mex - if you think about it, when you execute it with:
 ./octave_test.mex
on the command line, you are passing it one argument - the filename
itself.  Try changing your program to:
 #include <unistd.h>
 
 main()
 {
   execl("/home/Gandalf/octave_test.mex", "",
                     (void *) 0);
 }

The moral: never invoke a program such that argc=0 - it's just a bad
idea; since it never happens in "normal" operations, you never know
what may be depending on it.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: