[Top][All Lists]

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

Re: address@hidden: Re: Type-in programs using BASH]

From: Ryan Cunningham
Subject: Re: address@hidden: Re: Type-in programs using BASH]
Date: Mon, 26 Jan 2015 11:06:35 -0800

And that is exactly what I mean---running a separate program. Sorry for any confusion.

On Mon, Jan 26, 2015 at 10:43 AM, Greg Wooledge <address@hidden> wrote:
On Mon, Jan 26, 2015 at 10:36:37AM -0800, Ryan Cunningham wrote:
> I mean that the program would be loaded in the same manner in which Bash would execute any other object-code program that isn't loaded /into/ Bash as a builtin, like "ls", "su", and "dirname", all from GNU Coreutils.

Bash does not "load" external programs like ls.  It executes them
using execve().  (See shell_execve() in execute_cmd.c.)

If you're proposing some scenario where a user types a bunch of
raw object code on a keyboard, and then it gets saved to a file on
disk, and chmod is used to give the file execute permissions, and
then bash runs execve() on the resulting file, then I don't think
any reasonable interpretation could consider this "loading a library
of object code" as opposed to "running a separate program".

Ryan Cunningham

reply via email to

[Prev in Thread] Current Thread [Next in Thread]