autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.62-9-g9


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.62-9-g9651f4a
Date: Wed, 16 Apr 2008 22:48:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=9651f4a0e1b80c55da23a5ceaa0237121e0b95f2

The branch, master has been updated
       via  9651f4a0e1b80c55da23a5ceaa0237121e0b95f2 (commit)
      from  c48d3a706fc252323d258fdea9382533293d4df5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9651f4a0e1b80c55da23a5ceaa0237121e0b95f2
Author: Eric Blake <address@hidden>
Date:   Wed Apr 16 10:10:31 2008 -0600

    Document pdksh exec behavior.
    
    * doc/autoconf.texi (Limitations of Builtins) <exec>: New
    subsection.
    Discovered by Jim Meyering.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    7 +++++++
 doc/autoconf.texi |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b1d9a4e..9d9d04e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-16  Eric Blake  <address@hidden>
+
+       Document pdksh exec behavior.
+       * doc/autoconf.texi (Limitations of Builtins) <exec>: New
+       subsection.
+       Discovered by Jim Meyering.
+
 2008-04-14  Ralf Wildenhues  <address@hidden>
 
        * tests/autotest.at (AT_CHECK_AT): Allow to pass additional
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 8b10387..554d2ec 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13945,6 +13945,54 @@ but portable scripts should not rely on this.
 You should not rely on @code{LINENO} within @command{eval}.
 @xref{Special Shell Variables}.
 
address@hidden @command{exec}
address@hidden -----------------
address@hidden @command{exec}
+Posix describes several categories of shell built-ins.  Special
+built-ins (such as @command{exit}) must impact the environment of the
+current shell, and need not be available through @command{exec}.  All
+other built-ins are regular, and must not propagate variable assignments
+to the environment of the current shell.  However, the group of regular
+built-ins is further distinguished by commands that do not require a
address@hidden search (such as @command{cd}), in contrast to built-ins that
+are offered as a more efficient version of something that must still be
+found in a @env{PATH} search (such as @command{echo}).  Posix is not
+clear on whether @command{exec} must work with the list of 17 utilities
+that are invoked without a @env{PATH} search, and many platforms lack an
+executable for some of those built-ins:
+
address@hidden
+$ @kbd{sh -c 'exec cd /tmp'}
+sh: line 0: exec: cd: not found
address@hidden example
+
+All other built-ins that provide utilities specified by Posix must have
+a counterpart executable that exists on @env{PATH}, although Posix
+allows @command{exec} to use the built-in instead of the executable.
+For example, contrast @command{bash} 3.2 and @command{pdksh} 5.2.14:
+
address@hidden
+$ @kbd{bash -c 'pwd --version' | head -n1}
+bash: line 0: pwd: --: invalid option
+pwd: usage: pwd [-LP]
+$ @kbd{bash -c 'exec pwd --version' | head -n1}
+pwd (GNU coreutils) 6.10
+$ @kbd{pdksh -c 'exec pwd --version' | head -n1}
+pdksh: pwd: --: unknown option
address@hidden example
+
+When it is desired to avoid a regular shell built-in, the workaround is
+to use some other forwarding command, such as @command{env} or
address@hidden, that will ensure a path search:
+
address@hidden
+$ @kbd{pdksh -c 'exec true --version' | head -n1}
+$ @kbd{pdksh -c 'nice true --version' | head -n1}
+true (GNU coreutils) 6.10
+$ @kbd{pdksh -c 'env true --version' | head -n1}
+true (GNU coreutils) 6.10
address@hidden example
+
 @item @command{exit}
 @c -----------------
 @prindex @command{exit}


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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