git://git.onelab.eu
/
vsys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9b075f
)
(no commit message)
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Tue, 24 Mar 2009 15:54:19 +0000
(15:54 +0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Tue, 24 Mar 2009 15:54:19 +0000
(15:54 +0000)
unixsocketwatcher.ml
patch
|
blob
|
history
diff --git
a/unixsocketwatcher.ml
b/unixsocketwatcher.ml
index
517d7e0
..
fa46e69
100644
(file)
--- a/
unixsocketwatcher.ml
+++ b/
unixsocketwatcher.ml
@@
-44,6
+44,10
@@
let receive_event (listening_socket_spec:fname_and_fd) (_:fname_and_fd) =
(* Close all fds except for the socket *)
let fd = Obj.magic data_socket in
let _ =
+ (* Close fds *)
+ for i = 3 to 1023 do
+ if (i != fd) then close_if_open(i)
+ done;
execv execpath [|execpath;slice_name;sprintf "%d" fd|] (*with
Unix_error(num,str1,str2)->logprint "Error %d: %s (%s)" (Obj.magic num) str1 str2;raise (Unix_error(num,str1,str2))*)
in