Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-12-06 21:24:06 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-12-06 21:24:06 +0300
commit36093cfbbfaaa714ef049265d91bbde67d889e2c (patch)
tree78bdddee79b74672b2bc64ebf0a83330ea8a01f2 /winsup/cygwin/external.cc
parent6320370052b940a458f4f712b83e40fcf032e399 (diff)
* dcrt0.cc (initial_env): Use PATH_MAX instead of CYG_MAX_PATH for path
name buffer size. (dll_crt0_1): Allocate new_argv0 with PATH_MAX size. * exceptions.cc (debugger_command): Set size to 2 * PATH_MAX + 20; (error_start_init): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * external.cc (fillout_pinfo): Always fill out ep.progname 0-terminated. Fill out ep.progname_long. * fhandler_process.cc (fhandler_process::fill_filebuf): Allocate buffer for executable filename with PATH_MAX size. * pinfo.cc: Throughout use PATH_MAX instead of CYG_MAX_PATH. * pinfo.h (class _pinfo): Set progname size to PATH_MAX. * smallprint.cc: Include limits.h. Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * strace.cc (strace::vsprntf): Ditto. * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION_32_LP): Define. (EXTERNAL_PINFO_VERSION): Set to EXTERNAL_PINFO_VERSION_32_LP. (struct external_pinfo): Add progname_long member. * include/sys/dirent.h: Correctly include limits.h instead of sys/limits.h.
Diffstat (limited to 'winsup/cygwin/external.cc')
-rw-r--r--winsup/cygwin/external.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index ea7ae114e..cc080d2d2 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -88,7 +88,8 @@ fillout_pinfo (pid_t pid, int winpid)
ep.start_time = p->start_time;
ep.rusage_self = p->rusage_self;
ep.rusage_children = p->rusage_children;
- strcpy (ep.progname, p->progname);
+ ep.progname[0] = '\0';
+ strncat (ep.progname, p->progname, MAX_PATH - 1);
ep.strace_mask = 0;
ep.version = EXTERNAL_PINFO_VERSION;
@@ -96,6 +97,8 @@ fillout_pinfo (pid_t pid, int winpid)
ep.uid32 = p->uid;
ep.gid32 = p->gid;
+
+ strcpy (ep.progname_long, p->progname);
break;
}
}