bug-bash
[Top][All Lists]
Advanced

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

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


From: Greg Wooledge
Subject: Re: address@hidden: Re: Type-in programs using BASH]
Date: Mon, 26 Jan 2015 13:43:25 -0500
User-agent: Mutt/1.4.2.3i

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".



reply via email to

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