[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#167605: xfs should have configurable pid file



Package: xfs
Version: 4.2.1-3
Severity: normal
Tags: patch

In current xfs package, pid file is hardcoded to /var/run/xfs.pid.
Hardcoded pid file leads to problems if more than one font server should
run (e.g. one providing unicode fonts for fast clients, and another one
not providing unicode fonts for slow clients).

The following patch adds -pid option for xfs that may be used to change
pid file.

diff -ur xfs.orig/os/utils.c xfs/os/utils.c
--- xfs.orig/os/utils.c	Mon Nov  4 00:18:04 2002
+++ xfs/os/utils.c	Sun Nov  3 23:56:29 2002
@@ -219,7 +219,7 @@
 static void
 usage(void)
 {
-    fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon] [-nodaemon] [-user user_name]\n",
+    fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon] [-nodaemon] [-user user_name] [-pid pid_file]\n",
 	    progname);
     exit(1);
 }
@@ -338,6 +338,11 @@
 	} else if (!strcmp(argv[i], "-cf") || !strcmp(argv[i], "-config")) {
 	    if (argv[i + 1])
 		configfilename = argv[++i];
+	    else
+		usage();
+	} else if (!strcmp(argv[i], "-pid")) {
+	    if (argv[i + 1])
+		pidFile = argv[++i];
 	    else
 		usage();
 	}
diff -ur xfs.orig/xfs.man xfs/xfs.man
--- xfs.orig/xfs.man	Fri Dec 14 23:01:32 2001
+++ xfs/xfs.man	Mon Nov  4 00:10:33 2002
@@ -49,6 +49,7 @@
 [\-nodaemon]
 [\-port \fItcp_port\fP]
 [\-user \fIusername\fP]
+[\-pid \fIpid_file\fP]
 .SH DESCRIPTION
 .PP
 .I Xfs
@@ -99,6 +100,10 @@
 This is equivalent to
 .B \-droppriv
 except that xfs will run as user \fIusername\fR.
+.TP 8
+.B \-pid pid_file
+Save daemon process id into \fIpid_file\fR, instead of default
+\fI/var/run/xfs.pid\fR.
 .SH "SIGNALS"
 .TP 8
 .I SIGTERM


-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux sercond 2.4.19 #1 óÂÔ óÅÎ 28 15:05:51 MSD 2002 i686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R

Versions of packages xfs depends on:
ii  debconf                       1.2.14     Debian configuration management sy
ii  libc6                         2.3.1-3    GNU C Library: Shared libraries an
ii  zlib1g                        1:1.1.4-6  compression library - runtime

-- debconf information:
* xfs/default_100dpi: 
* xfs/default_nolisten_tcp: 





Reply to: