How does Unix kernel find /bin/sh?
Phil Cornes
pc at cs.keele.ac.uk
Tue Sep 5 00:45:11 AEST 1989
>From article <5 at minya.UUCP>, by jc at minya.UUCP (John Chambers):
> Well, here I am again, with yet another puzzle.....
>
> The problem is simple: when I exec a script directly, the kernel
> doesn't run /bin/sh, it runs /bin/bsh.....
>
The exec command is actually a shell built in command so your 'ish'
won't find it and will therefore execute /bin/bsh to sort it out.
>
> I'd like an RTFM response or two. I've spent some time poring through
> some FMs, and so far I haven't even found any admission that the Unix
> kernel knows how to run scripts.
>
The UNIX kernel *doesn't* know how to execute scripts, that is done by
the C library interface to the exec*() system calls by spawning a shell
to cope with the script.
>
> [A free copy of ish will be emailed (if possible;-) to the first five
> individuals who correctly answer the question...]
>
Yes please.....?
Phil Cornes I just called to say .....
-----------*
JANET: cdtpc at uk.ac.stafpol.cr83
Phone: +44 (0)785 53511 x6058
Smail: Staffordshire Polytechnic, Computing Department
Blackheath Lane, STAFFORD, ST18 0AD, ENGLAND.
More information about the Comp.unix.wizards
mailing list