Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!uunet!mcsun!ukc!kl-cs!pc From: pc@cs.keele.ac.uk (Phil Cornes) Newsgroups: comp.unix.wizards Subject: Re: How does Unix kernel find /bin/sh? Message-ID: <748@kl-cs.UUCP> Date: 4 Sep 89 14:45:11 GMT References: <5@minya.UUCP> Organization: University of Keele, England Lines: 31 From article <5@minya.UUCP>, by jc@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@uk.ac.stafpol.cr83 Phone: +44 (0)785 53511 x6058 Smail: Staffordshire Polytechnic, Computing Department Blackheath Lane, STAFFORD, ST18 0AD, ENGLAND.