diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-21 01:00:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-21 01:00:58 +0000 |
commit | 5ec14fe40ae1a6b11d27b975feca1b20de435467 (patch) | |
tree | 568cd69f0dca513973fc6e6646fe6ea4b3b9dafe /winsup/cygwin/exec.cc | |
parent | ccefaab1d5735466b54f8c5dd279a310d6020a77 (diff) | |
download | cygnal-5ec14fe40ae1a6b11d27b975feca1b20de435467.tar.gz cygnal-5ec14fe40ae1a6b11d27b975feca1b20de435467.tar.bz2 cygnal-5ec14fe40ae1a6b11d27b975feca1b20de435467.zip |
Change _function() to function() throughout.
* cygwin.din: Remove last vestiges (?) of newlib wrappers.
* cygthread.cc (cygthread::detach): Always wait for event or suffer an
apparently inavoidable race.
* dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated.
* debub.cc (lock_debug): Don't acquire lock on exit.
* fork.cc (fork_child): Recreate mmaps before doing anything else since Windows
has a habit of using blocks of memory in the child that could previously have
been occupied by shared memory in the parent.
* mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and
provide some details about what went wrong.
(fixup_mmaps_after_fork): Remove error message.
* shared.cc (open_shared): Move warning message so that more detail is
possible.
* sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race.
(sigproc_terminate): Specifically wait for process thread to terminate.
Diffstat (limited to 'winsup/cygwin/exec.cc')
-rw-r--r-- | winsup/cygwin/exec.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc index 942b79d83..f0288dc93 100644 --- a/winsup/cygwin/exec.cc +++ b/winsup/cygwin/exec.cc @@ -8,6 +8,7 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ +#define _execve __FOO_execve_ #include "winsup.h" #include <unistd.h> #include <stdlib.h> @@ -20,12 +21,13 @@ details. */ #include "pinfo.h" #include "environ.h" #include "cygerrno.h" +#undef _execve /* This is called _execve and not execve because the real execve is defined in libc/posix/execve.c. It calls us. */ extern "C" int -_execve (const char *path, char *const argv[], char *const envp[]) +execve (const char *path, char *const argv[], char *const envp[]) { static char *const empty_env[] = { 0 }; MALLOC_CHECK; @@ -34,6 +36,9 @@ _execve (const char *path, char *const argv[], char *const envp[]) return spawnve (_P_OVERLAY, path, argv, envp); } +extern "C" int _execve (const char *, char *const [], char *const []) + __attribute__ ((alias ("execve"))); + extern "C" int execl (const char *path, const char *arg0, ...) { @@ -49,14 +54,14 @@ execl (const char *path, const char *arg0, ...) while (argv[i++] != NULL); va_end (args); MALLOC_CHECK; - return _execve (path, (char * const *) argv, cur_environ ()); + return execve (path, (char * const *) argv, cur_environ ()); } extern "C" int execv (const char *path, char * const *argv) { MALLOC_CHECK; - return _execve (path, (char * const *) argv, cur_environ ()); + return execve (path, (char * const *) argv, cur_environ ()); } extern "C" pid_t |