Module Name: src
Committed By: pooka
Date: Sun Feb 6 15:41:38 UTC 2011
Modified Files:
src/lib/librumpclient: rumpclient.c
Log Message:
Make sure to close parent's server communication socket after fork.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/librumpclient/rumpclient.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.22 src/lib/librumpclient/rumpclient.c:1.23
--- src/lib/librumpclient/rumpclient.c:1.22 Sat Feb 5 12:38:19 2011
+++ src/lib/librumpclient/rumpclient.c Sun Feb 6 15:41:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpclient.c,v 1.22 2011/02/05 12:38:19 pooka Exp $ */
+/* $NetBSD: rumpclient.c,v 1.23 2011/02/06 15:41:37 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -777,10 +777,13 @@
rumpclient_fork_init(struct rumpclient_fork *rpf)
{
int error;
+ int osock;
+ osock = clispc.spc_fd;
memset(&clispc, 0, sizeof(clispc));
- clispc.spc_fd = -1;
- kq = -1;
+ clispc.spc_fd = osock;
+
+ kq = -1; /* kqueue descriptor is not copied over fork() */
if (doinit() == -1)
return -1;