]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Close stdin, stdout and stderr in mlmmj-recieve after forking.
authorxi <none@none>
Tue, 25 Apr 2006 12:30:11 +0000 (22:30 +1000)
committerxi <none@none>
Tue, 25 Apr 2006 12:30:11 +0000 (22:30 +1000)
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.

ChangeLog
src/mlmmj-recieve.c

index 6ba87ebc9e30a5602d57cd7c391b1a1f154c818d..470ed042b6fafe9544679442af056b936ad7f5de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index e3eca9d244d21a69321540adb4b8b006b42bf9cb..deac52b4c35eb1191c36d10ad19b9d18684c4a31 100644 (file)
@@ -162,6 +162,10 @@ int main(int argc, char **argv)
        
                if(childpid)
                        exit(EXIT_SUCCESS); /* Parent says: "bye bye kids!"*/
+
+               close(0);
+               close(1);
+               close(2);
        }
 
        execlp(mlmmjprocess, mlmmjprocess,