changeset 544:869a202ffb3b

Close stdin, stdout and stderr in mlmmj-recieve after forking. On FreeBSD this allows the process calling mlmmj-receive to get the return code and continue. Without the change it just waits for the child to finish which might take a long time. It shouldn't hurt other platforms in any way.
author xi
date Tue, 25 Apr 2006 22:30:11 +1000
parents e6565d2a4368
children ecac9738ba4f
files ChangeLog src/mlmmj-recieve.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 11 06:40:52 2006 +1000
+++ b/ChangeLog	Tue Apr 25 22:30:11 2006 +1000
@@ -1,3 +1,5 @@
+ o Close stdin, stdout and stderr in the child of mlmmj-receive after
+   forking. This is neccesary on FreeBSD.
  o No need to check for subscribers in 0-sized files
  o Make sure chomp works with empty strings (Frank Denis)
 1.2.11
--- a/src/mlmmj-recieve.c	Tue Apr 11 06:40:52 2006 +1000
+++ b/src/mlmmj-recieve.c	Tue Apr 25 22:30:11 2006 +1000
@@ -162,6 +162,10 @@
 	
 		if(childpid)
 			exit(EXIT_SUCCESS); /* Parent says: "bye bye kids!"*/
+
+		close(0);
+		close(1);
+		close(2);
 	}
 
 	execlp(mlmmjprocess, mlmmjprocess,