Change 11548 by jhi@alpha on 2001/08/02 13:18:08
setproctitle() made simpler. (This assumes the string is
\0-terminated: if not, the three-arg form setproctitle(fmt, len, s)
should be used. Note len, not len + 1.) BSD-fu from Anton
Berezin.
Affected files ...
... //depot/perl/mg.c#188 edit
Differences ...
==== //depot/perl/mg.c#188 (text) ====
Index: perl/mg.c
--- perl/mg.c.~1~ Thu Aug 2 07:30:05 2001
+++ perl/mg.c Thu Aug 2 07:30:05 2001
@@ -2089,7 +2089,7 @@
* but not the "(perl) suffix from the ps(1)
* output, because that's what ps(1) shows if the
* argv[] is modified. */
- setproctitle("-%s", s, len + 1);
+ setproctitle("-%s", s);
# else /* old FreeBSDs, NetBSD, OpenBSD, anyBSD */
/* This doesn't really work if you assume that
* $0 = 'foobar'; will wipe out 'perl' from the $0
End of Patch.