[master] d0ee07f Remove empty setproctitle() compat function.

Poul-Henning Kamp phk at varnish-cache.org
Thu May 12 15:54:30 CEST 2011


commit d0ee07f8c5e2e24c73bef5a50cdc425398425164
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu May 12 13:54:13 2011 +0000

    Remove empty setproctitle() compat function.

diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c
index a7c91a4..3ed569d 100644
--- a/bin/varnishd/mgt_child.c
+++ b/bin/varnishd/mgt_child.c
@@ -43,10 +43,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#ifndef HAVE_SETPROCTITLE
-#include "compat/setproctitle.h"
-#endif
-
 #include "mgt.h"
 #include "vsm.h"
 #include "heritage.h"
@@ -337,7 +333,9 @@ start_child(struct cli *cli)
 				continue;
 			(void)(close(i) == 0);
 		}
+#ifdef HAVE_SETPROCTITLE
 		setproctitle("Varnish-Chld %s", heritage.name);
+#endif
 
 		(void)signal(SIGINT, SIG_DFL);
 		(void)signal(SIGTERM, SIG_DFL);
@@ -582,7 +580,9 @@ MGT_Run(void)
 	e->name = "mgt_sigchild";
 	AZ(vev_add(mgt_evb, e));
 
+#ifdef HAVE_SETPROCTITLE
 	setproctitle("Varnish-Mgr %s", heritage.name);
+#endif
 
 	memset(&sac, 0, sizeof sac);
 	sac.sa_handler = SIG_IGN;
diff --git a/bin/varnishd/mgt_sandbox.c b/bin/varnishd/mgt_sandbox.c
index 0922490..653f1d5 100644
--- a/bin/varnishd/mgt_sandbox.c
+++ b/bin/varnishd/mgt_sandbox.c
@@ -52,10 +52,6 @@
 #include <priv.h>
 #endif
 
-#ifndef HAVE_SETPROCTITLE
-#include "compat/setproctitle.h"
-#endif
-
 #ifdef __linux__
 #include <sys/prctl.h>
 #endif
diff --git a/include/Makefile.am b/include/Makefile.am
index 146cc6a..29ddec3 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -19,7 +19,6 @@ nobase_noinst_HEADERS = \
 	cli_serve.h \
 	compat/daemon.h \
 	compat/execinfo.h \
-	compat/setproctitle.h \
 	compat/srandomdev.h \
 	flopen.h \
 	http_headers.h \
diff --git a/include/compat/setproctitle.h b/include/compat/setproctitle.h
deleted file mode 100644
index 85bb5e8..0000000
--- a/include/compat/setproctitle.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2009 Linpro AS
- * All rights reserved.
- *
- * Author: Dag-Erling Smørgrav <des at des.no>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef COMPAT_SETPROCTITLE_H_INCLUDED
-#define COMPAT_SETPROCTITLE_H_INCLUDED
-
-#ifndef HAVE_SETPROCTITLE
-void setproctitle(const char *fmt, ...);
-#endif
-
-#endif
diff --git a/lib/libvarnishcompat/Makefile.am b/lib/libvarnishcompat/Makefile.am
index 7e6102c..22c652e 100644
--- a/lib/libvarnishcompat/Makefile.am
+++ b/lib/libvarnishcompat/Makefile.am
@@ -9,5 +9,4 @@ libvarnishcompat_la_LDFLAGS = -avoid-version
 libvarnishcompat_la_SOURCES = \
 	daemon.c \
 	execinfo.c \
-	setproctitle.c \
 	srandomdev.c
diff --git a/lib/libvarnishcompat/setproctitle.c b/lib/libvarnishcompat/setproctitle.c
deleted file mode 100644
index a8d46d1..0000000
--- a/lib/libvarnishcompat/setproctitle.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2009 Linpro AS
- * All rights reserved.
- *
- * Author: Dag-Erling Smørgrav <des at des.no>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#ifndef HAVE_SETPROCTITLE
-
-#include <stdarg.h>
-
-#include "compat/setproctitle.h"
-
-void
-setproctitle(const char *fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-	/* XXX */
-	va_end(ap);
-}
-#endif



More information about the varnish-commit mailing list