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:
1535c8c
)
Finished piece.
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Tue, 24 Mar 2009 15:19:21 +0000
(15:19 +0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Tue, 24 Mar 2009 15:19:21 +0000
(15:19 +0000)
unixsocketwatcher.ml
patch
|
blob
|
history
diff --git
a/unixsocketwatcher.ml
b/unixsocketwatcher.ml
index
b5672b0
..
f0e3f5a
100644
(file)
--- a/
unixsocketwatcher.ml
+++ b/
unixsocketwatcher.ml
@@
-43,8
+43,13
@@
let receive_event (listening_socket_spec:fname_and_fd) (_:fname_and_fd) =
begin
(* Child *)
(* Close all fds except for the socket *)
begin
(* Child *)
(* Close all fds except for the socket *)
- ignore(execv execpath,[execpath,sprintf "%d" (Obj.magic data_socket)]);
- logprint "Could not execve %s" execpath
+ let fd = Obj.magic data_socket in
+ print "Fd: %d\n" fd;
+ let _ =
+ 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
+ logprint "Could not execve %s" execpath
end
end
| None -> ()
end
end
| None -> ()