This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Possibility to not fork nscd


Sorry, forgot the patch.
-----------------
Hi all,

I'd searched for a possibility to prevent nscd from forking. I want to
handle it via daemontools but daemontools are just usable with
non-forking daemons. So the attached patch (applies for 2.3.5 and 2.3.6)
adds an option "--nofork" ("-n") and prevents nscd from forking.

Greets, Lars
P.S.: Please put me in CC, 'cause I'm not on
libc-alpha@sources.redhat.com
-- 
      "Kriterium des Wahren ist nicht seine unmittelbare
          Kommunizierbarkeit an jedermann"
         -- Theodor Wiesengrund Adorno, aus: ÂNegative DialektikÂ

name: Lars H. Strojny      web: http://strojny.net 
street: EngelsstraÃe 23    blog: http://usrportage.de
city: D-51103 KÃln         mail/jabber: lars@strojny.net
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07

--- nscd/nscd.c.old	2006-03-21 01:18:08.557556250 +0100
+++ nscd/nscd.c	2006-03-21 01:20:12.593308000 +0100
@@ -100,6 +100,8 @@
     N_("Read configuration data from NAME") },
   { "debug", 'd', NULL, 0,
     N_("Do not fork and display messages on the current tty") },
+  { "nofork", "n", NULL, 0,
+    N_("Do not fork") },
   { "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
   { "shutdown", 'K', NULL, 0, N_("Shut the server down") },
   { "statistic", 'g', NULL, 0, N_("Print current configuration statistic") },
@@ -299,6 +301,10 @@
       conffile = arg;
       break;
 
+    case "n":
+      go_background = 0;
+      break;
+
     case 'K':
       if (getuid () != 0)
 	error (EXIT_FAILURE, 0, _("Only root is allowed to use this option!"));

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]