fork/exec bug/problem since 2.1.123

Christian Magnusson (d1mag@dtek.chalmers.se)
Mon, 5 Oct 1998 19:15:08 +0200 (MET DST)


Hi...

Since kernel 2.1.123 there are a new feature with the fork/execvp function.
If you define an invalid/non-existant path, fork fails.

>rm -rf /apa
>rm /bad
>ln -s /apa /bad
>setenv PATH /bad/bin:$PATH

Try this...
>tar -tvzf /usr/src/linux-2.1.123.tar.gz
tar (child): Cannot exec gzip: Not a directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

'mtv' installed in /usr/local/bin fails with this error:
>mtv
g2a_init: execvp: Not a directory
g2a_init: cannot execvp mtvp
mtv: mtv.c:5042: fatal: cannot start player (mtvp) - could not fork: Not a directory

If you now create the directory "/apa" it works since the symbolic link
is ok.

>mkdir /apa
>tar -tvzf /usr/src/linux-2.1.123.tar.gz
drwxr-xr-x torvalds/torvalds 0 1998-09-28 05:29 linux/
-rw-r--r-- torvalds/torvalds 12398 1998-09-20 20:38 linux/Makefile
drwxr-xr-x torvalds/torvalds 0 1998-09-28 05:28 linux/fs/
.......

Shouldn't this be corrected ?

/Mag

----
| Christian 'Mag' Magnusson
| Email: d1mag@dtek.chalmersNOHAM.se (remove NOHAM)
| http://www.dtek.chalmers.se/~d1mag/GPL.html (Gothenburg Pinball League)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/