GNU bug report logs -
#13054
Assume POSIX 1003.1-1988 or later for execve.
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Sun, 2 Dec 2012 04:41:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13054 in the body.
You can then email your comments to 13054 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 04:41:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 02 Dec 2012 04:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attached is a patch to simplify Emacs that I discovered while looking
into the putenv/setenv problem. It affects the NT port so I'm
CC'ing this to Eli to give him a heads-up.
[execve.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 08:31:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13054 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> + Assume POSIX 1003.1-1988 or later for execve.
> + * callproc.c (Fcall_process):
> + * process.c (create_process):
> + Don't save and restore environ; no longer needed.
> + * callproc.c (child_setup):
> + Use execve, not execvp, to preserve environ.
How does this have anything to do with POSIX?
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 17:07:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13054 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 01 Dec 2012 22:37:39 -0600
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: Eli Zaretskii <eliz <at> gnu.org>
>
> Attached is a patch to simplify Emacs that I discovered while looking
> into the putenv/setenv problem. It affects the NT port so I'm
> CC'ing this to Eli to give him a heads-up.
Thanks. You can go ahead and commit this, these changes don't affect
MS-Windows at all (except in trivial "a = b; b = a;" way, without
changing a or b in between).
However, please omit these changes from the changeset:
> === modified file 'lib-src/ntlib.h'
> --- lib-src/ntlib.h 2012-01-19 07:21:25 +0000
> +++ lib-src/ntlib.h 2012-12-02 04:32:26 +0000
> @@ -79,6 +79,7 @@
>
> /* map to MSVC names */
> #define execlp _execlp
> +#define execve _execve
> #define execvp _execvp
> #define fdopen _fdopen
> #ifndef fileno
> @@ -104,4 +105,3 @@
> #undef _WINSOCK_H
>
> /* end of ntlib.h */
> -
>
> === modified file 'nt/ChangeLog'
> --- nt/ChangeLog 2012-12-01 20:09:30 +0000
> +++ nt/ChangeLog 2012-12-02 04:32:26 +0000
> @@ -1,3 +1,8 @@
> +2012-12-02 Paul Eggert <eggert <at> cs.ucla.edu>
> +
> + Assume POSIX 1003.1-1988 or later for execve.
> + * inc/ms-w32.h (execve): New macro.
> +
> 2012-12-01 Juanma Barranquero <lekktu <at> gmail.com>
>
> * config.nt: Sync with autogen/config.in.
>
> === modified file 'nt/inc/ms-w32.h'
> --- nt/inc/ms-w32.h 2012-11-27 03:10:32 +0000
> +++ nt/inc/ms-w32.h 2012-12-02 04:32:26 +0000
> @@ -204,6 +204,7 @@
>
> /* Map to MSVC names. */
> #define execlp _execlp
> +#define execve _execve
> #define execvp _execvp
> #define fdopen _fdopen
> #ifndef fileno
>
They are not needed. (The Windows build of Emacs doesn't use any
functions of the exec* family, because they are fundamentally broken
on Windows. I will look into removing the other exec* macros from
Windows-specific files.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 18:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 13054 <at> debbugs.gnu.org (full text, mbox):
On 12/02/2012 12:27 AM, Andreas Schwab wrote:
> How does this have anything to do with POSIX?
The patched version uses execve, the unpatched version doesn't.
Long ago, it made sense to avoid execve, because some pre-POSIX
platforms lacked execve. (The FreeBSD man pages say that
execve was introduced in 4.2BSD, so I assume 4.1BSD lacked it.)
execve was standardized in POSIX 1003.1-1988, though. It's
safe to assume execve now on all POSIXish platforms, and doing
so simplifies Emacs a bit.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 18:51:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 13054 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> The patched version uses execve, the unpatched version doesn't.
> Long ago, it made sense to avoid execve, because some pre-POSIX
> platforms lacked execve.
execvp is just a wrapper around execve, so avoiding the latter doesn't
make sense. There must be some other reason why execvp is used.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Sun, 02 Dec 2012 19:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
bug acknowledged by developer.
(Sun, 02 Dec 2012 19:22:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 13054-done <at> debbugs.gnu.org (full text, mbox):
On 12/02/2012 10:48 AM, Andreas Schwab wrote:
> execvp is just a wrapper around execve
> There must be some other reason why execvp is used.
Perhaps the author of that part of Emacs simply
didn't know about execve. That would explain things.
It sounds like the main issue here is about mentioning
POSIX in the ChangeLog, so I removed that, along with
removing the other stuff Eli asked to remove, and
installed it as trunk bzr 111064.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13054
; Package
emacs
.
(Sun, 02 Dec 2012 21:13:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 13054-done <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> Perhaps the author of that part of Emacs simply
> didn't know about execve. That would explain things.
I think the original author just wanted child_setup to search PATH. The
change logs don't give any indication whether that was ever necessary.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 31 Dec 2012 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.