0) I will suggest /sbin/unknown-exec (which can be symbolic link
to /usr/sbin).
1) argv[0] can have no relation
to the executable (i.e. open (argv[0],...) can fail). So for example
you will not able to have a java-interpreted login shell :-).
2) After you exec() /usr/sbin/unknown-exec, you are not allowed
to return "cannot execute binary file" (ENOEXEC, I think), since
there is no longer a text which has called exec(). So you have
no valid return address.
-Yenya
-- Jan "Yenya" Kasprzak | mailto:kas@muni.cz | http://www.fi.muni.cz/~kas/ [[[[ Student of Informatics, Faculty of Informatics, Masaryk University ]]]] [[[[ Czech Linux Homepage: http://www.fi.muni.cz/~kas/linux/ ]]]] ``Hoping the problem magically goes away by ignoring it is the "microsoft approach to programming" and should never be allowed.'' --Linus Torvalds