[Pkg-sysvinit-commits] r1429 - in sysvinit-upstream/trunk: doc src
Petter Reinholdtsen
pere at alioth.debian.org
Fri Jul 10 21:57:24 UTC 2009
Author: pere
Date: 2009-07-10 21:57:23 +0000 (Fri, 10 Jul 2009)
New Revision: 1429
Modified:
sysvinit-upstream/trunk/doc/Changelog
sysvinit-upstream/trunk/src/init.c
Log:
Adjust init to terminate argv0 with one 0 rather than two so that process name can be one character longer. Patch by Kir Kolyshkin.
Modified: sysvinit-upstream/trunk/doc/Changelog
===================================================================
--- sysvinit-upstream/trunk/doc/Changelog 2009-07-10 21:51:19 UTC (rev 1428)
+++ sysvinit-upstream/trunk/doc/Changelog 2009-07-10 21:57:23 UTC (rev 1429)
@@ -39,6 +39,8 @@
* Add -c option to pidof for only matching processes with the same
process root. Ignore -c when not running as root. Patch from
Thomas Woerner and Fedora.
+ * Adjust init to terminate argv0 with one 0 rather than two so that
+ process name can be one character longer. Patch by Kir Kolyshkin.
-- Petter Reinholdtsen <pere at debian.org> Fri, 30 Jul 2004 14:14:58 +0200
Modified: sysvinit-upstream/trunk/src/init.c
===================================================================
--- sysvinit-upstream/trunk/src/init.c 2009-07-10 21:51:19 UTC (rev 1428)
+++ sysvinit-upstream/trunk/src/init.c 2009-07-10 21:57:23 UTC (rev 1429)
@@ -470,9 +470,9 @@
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if (maxproclen > 2) {
+ if (maxproclen > 1) {
memset(argv0, 0, maxproclen);
- strncpy(argv0, buf, maxproclen - 2);
+ strncpy(argv0, buf, maxproclen - 1);
}
return len;
More information about the Pkg-sysvinit-commits
mailing list