diff options
author | Christopher Faylor <me@cgf.cx> | 2005-05-09 01:19:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-05-09 01:19:38 +0000 |
commit | 1cd8ccec870628c8767a71bc034fc660e37b4399 (patch) | |
tree | 67f8e144b268f78822909b3ffcc15a6822557b01 /winsup/cygwin/external.cc | |
parent | 61931ed5dc714957bdd613d3fb382d41b9080e83 (diff) | |
download | cygnal-1cd8ccec870628c8767a71bc034fc660e37b4399.tar.gz cygnal-1cd8ccec870628c8767a71bc034fc660e37b4399.tar.bz2 cygnal-1cd8ccec870628c8767a71bc034fc660e37b4399.zip |
* dcrt0.cc (get_cygwin_startup_info): New function pulled from dll_crt0_0.
(dll_crt0_0): Use get_cygwin_startup_info to retrieve cygwin-specific startup
pointer.
* external.cc (cygwin_internal): Implement CW_ARGV and CW_ENVP.
* include/sys/cygwin.h: Implement CW_ARGV and CW_ENVP.
Diffstat (limited to 'winsup/cygwin/external.cc')
-rw-r--r-- | winsup/cygwin/external.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 5ab476f44..60997f8a2 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -27,8 +27,10 @@ details. */ #include "heap.h" #include "pwdgrp.h" #include "cygtls.h" +#include "child_info.h" void *hook_cygwin (const char *, const void *); +child_info *get_cygwin_startup_info (); static external_pinfo * fillout_pinfo (pid_t pid, int winpid) @@ -306,6 +308,16 @@ cygwin_internal (cygwin_getinfo_types t, ...) const void *hookfn = va_arg (arg, const void *); return (unsigned long) hook_cygwin (name, hookfn); } + case CW_ARGV: + { + child_info_spawn *ci = (child_info_spawn *) get_cygwin_startup_info (); + return (DWORD) (ci ? ci->moreinfo->argv : NULL); + } + case CW_ENVP: + { + child_info_spawn *ci = (child_info_spawn *) get_cygwin_startup_info (); + return (DWORD) (ci ? ci->moreinfo->envp : NULL); + } default: return (DWORD) -1; } |