Enlightenment CVS committal
Author : xcomputerman
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/daemon
Modified Files:
spawner.c
Log Message:
Eek, ipc init was using wrong pid for title in daemon mode!
Apparently the system does not like socket communication with stdio fds
closed, so I'm redirecting them to /dev/null instead. This should also
fix issues with ssh-agent.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- spawner.c 17 May 2004 05:31:50 -0000 1.19
+++ spawner.c 19 May 2004 03:48:15 -0000 1.20
@@ -470,6 +470,8 @@
entranced_debug("entranced: main: display number is %d\n", d->dispnum);
+
+ entranced_pid = getpid();
if (nodaemon)
{
if (Entranced_Write_Pidfile(entranced_pid))
@@ -480,7 +482,9 @@
}
}
else
+ {
Entranced_Fork_And_Exit();
+ }
/* Check to make sure entrance binary is executable */
if (access(ENTRANCE, X_OK))
@@ -493,13 +497,18 @@
/* Daemonize */
if (!nodaemon)
{
+ /* This causes socket communication issues, yet unidentified */
+ /*
close(0);
close(1);
close(2);
+ */
+ freopen("/dev/null", "r", stdin);
+ freopen("/dev/null", "w", stdout);
+ freopen("/dev/null", "w", stderr);
}
-
/* Init IPC */
- if (!entranced_ipc_init(entranced_pid))
+ if (!entranced_ipc_init(getpid()))
exit(1);
/* Event filter */
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs