[Glibc-bsd-commits] r1409 - trunk/libbsd/src

Robert Millan rmh at costa.debian.org
Thu Mar 30 13:53:35 UTC 2006


Author: rmh
Date: 2006-03-30 13:53:34 +0000 (Thu, 30 Mar 2006)
New Revision: 1409

Modified:
   trunk/libbsd/src/progname.c
Log:
Revert commit 1408.

Modified: trunk/libbsd/src/progname.c
===================================================================
--- trunk/libbsd/src/progname.c	2006-03-30 11:14:56 UTC (rev 1408)
+++ trunk/libbsd/src/progname.c	2006-03-30 13:53:34 UTC (rev 1409)
@@ -19,10 +19,9 @@
   Rejected in glibc (http://sourceware.org/ml/libc-alpha/2006-03/msg00125.html)
 */
 
-#include <bsd/stdlib.h>		/* progname, strdup */
-#include <string.h>		/* free */
+#include <bsd/stdlib.h>
 
-char *__progname = NULL;
+static char *__progname = NULL;
 
 char *
 getprogname ()
@@ -33,10 +32,5 @@
 void
 setprogname (char *new)
 {
-  /* For some reason, accessing the argv vector directly may cause SIGSEV.  Let's copy it to avoid trouble. */
-
-  if (__progname != NULL)
-    free (__progname);
-
-  __progname = strdup (new);
+  __progname = new;
 }




More information about the Glibc-bsd-commits mailing list