diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-07-19 20:00:28 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-07-19 20:00:28 +0400 |
commit | 9d272b3c31601772aac330c1e749587fa7fbc677 (patch) | |
tree | c5eb12051d2d68efb2848fc2de7463c7c781ccb4 /winsup/cygwin/pinfo.cc | |
parent | add2f65f37a78e25aa141d8f74c728731fe65a19 (diff) |
* pinfo.cc (commune_process): Don't add extra \0 to cmdline.
(_pinfo::cmdline): Ditto process internal.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 93ab9b945..9440943d8 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -418,7 +418,7 @@ commune_process (void *arg) case PICOM_CMDLINE: { sigproc_printf ("processing PICOM_CMDLINE"); - unsigned n = 1; + unsigned n = 0; extern int __argc_safe; const char *argv[__argc_safe + 1]; @@ -443,11 +443,6 @@ commune_process (void *arg) sigproc_printf ("WriteFile arg %d failed, %E", a - argv); break; } - if (!WriteFile (tothem, "", 1, &nr, NULL)) - { - sigproc_printf ("WriteFile null failed, %E"); - break; - } break; } case PICOM_CWD: @@ -819,7 +814,7 @@ _pinfo::cmdline (size_t& n) } else { - n = 1; + n = 0; for (char **a = __argv; *a; a++) n += strlen (*a) + 1; char *p; @@ -829,7 +824,6 @@ _pinfo::cmdline (size_t& n) strcpy (p, *a); p = strchr (p, '\0') + 1; } - *p = '\0'; } return s; } |