Blocking on IO ...
- From: Michael Meeks <michael ximian com>
- To: Havoc Pennington <hp redhat com>
- Cc: <gconf-list gnome org>
- Subject: Blocking on IO ...
- Date: Mon, 13 Aug 2001 20:40:48 -0400 (EDT)
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]