Blocking on IO ...



	Can I apply this - following the bonobo-activation style scheme,
since then we can turn some of the more cunning ORBit2 trace debug on
which dumps to stderr without locking gconfd:

Index: gconf/gconfd.c
===================================================================
RCS file: /cvs/gnome/gconf/gconf/gconfd.c,v
retrieving revision 1.105
diff -u -r1.105 gconfd.c
--- gconf/gconfd.c	2001/08/01 16:18:49	1.105
+++ gconf/gconfd.c	2001/08/14 00:29:36
@@ -475,15 +475,22 @@
   char *lock_dir;
   char *gconfd_dir;
   ConfigServer other_server;
+  int          dev_null_fd;

   chdir ("/");

   /* This is so we don't prevent unmounting of devices. We divert
    * all messages to syslog
    */
-  close (0);
-  close (1);
-  close (2);
+
+  g_assert (chdir ("/") == 0);
+
+  dev_null_fd = open ("/dev/null", O_RDWR);
+  if (dev_null_fd >= 0) {
+	  dup2 (dev_null_fd, 0);
+	  dup2 (dev_null_fd, 1);
+	  dup2 (dev_null_fd, 2);
+  }

   umask (022);


	Of course - ideally we'd have an environment variable to let it
all spew to the console where it can be easily caught - is that
interesting ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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