diff options
author | Christopher Faylor <me@cgf.cx> | 2010-05-18 14:30:51 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-05-18 14:30:51 +0000 |
commit | d3258e063cb0a4fc77a76df3c91ba9841ca4971c (patch) | |
tree | 2921ded7329f12667d439c207fa81f15575dba14 /winsup/cygwin/fork.cc | |
parent | c8bd391c328c8650a93388f5cb3409c3740ee963 (diff) | |
download | cygnal-d3258e063cb0a4fc77a76df3c91ba9841ca4971c.tar.gz cygnal-d3258e063cb0a4fc77a76df3c91ba9841ca4971c.tar.bz2 cygnal-d3258e063cb0a4fc77a76df3c91ba9841ca4971c.zip |
* environ.cc (regopt): Change the first argument to wide char string.
(environ_init): Accommodate change to the first argument of regopt.
* exception.cc (open_stackdumpfile): Accommodate change to the type of progname
in _pinfo.
* external.cc (fillout_pinfo): Ditto.
* fhandler_process.cc (format_process_winexename): Ditto.
(format_process_stat): Ditto.
* fork.cc (fork::parent): Ditto.
* pinfo.cc (pinfo_basic::pinfo_basic): Call GetModuleFileNameW instead of
GetModuleFileName.
(pinfo::thisproc): Accommodate change to the type of progname in _pinfo.
(pinfo_init): Ditto.
* pinfo.h (_pinfo): Change the type of progname to a wide char array.
* registry.h (reg_key::get_int): Change the first argument from constant point
to pointer to constant.
(reg_key::get_string): Ditto. Change the last argument likewise.
* registry.cc (reg_key::get_int): Accommodate change to the declaration.
(reg_key::get_string): Ditto.
* strace.cc (strace::hello): Accommodate change to the type of progname in
_pinfo.
(strace::vsprntf): Ditto.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index f0a427a63..97440ae0f 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -342,13 +342,8 @@ frok::parent (volatile char * volatile stack_here) si.lpReserved2 = (LPBYTE) &ch; si.cbReserved2 = sizeof (ch); - /* FIXME: myself->progname should be converted to WCHAR. */ - tmp_pathbuf tp; - PWCHAR progname = tp.w_get (); - sys_mbstowcs (progname, NT_MAX_PATH, myself->progname); - syscall_printf ("CreateProcess (%W, %W, 0, 0, 1, %p, 0, 0, %p, %p)", - progname, progname, c_flags, &si, &pi); + myself->progname, myself->progname, c_flags, &si, &pi); bool locked = __malloc_lock (); time_t start_time = time (NULL); @@ -358,8 +353,8 @@ frok::parent (volatile char * volatile stack_here) while (1) { - rc = CreateProcessW (progname, /* image to run */ - progname, /* what we send in arg0 */ + rc = CreateProcessW (myself->progname, /* image to run */ + myself->progname, /* what we send in arg0 */ &sec_none_nih, &sec_none_nih, TRUE, /* inherit handles from parent */ @@ -430,7 +425,7 @@ frok::parent (volatile char * volatile stack_here) /* Initialize things that are done later in dll_crt0_1 that aren't done for the forkee. */ - strcpy (child->progname, myself->progname); + wcscpy (child->progname, myself->progname); /* Fill in fields in the child's process table entry. */ child->dwProcessId = pi.dwProcessId; |