Commit b628191f authored by Guido Trotter's avatar Guido Trotter
Browse files

AsyncAwaker: use shutdown on the socketpair

This makes sure the out_socket can only be used for writing, and the
in_socket for reading.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarMichael Hanselmann <>
parent c2a8e8ba
...@@ -339,6 +339,8 @@ class AsyncAwaker(GanetiBaseAsyncoreDispatcher): ...@@ -339,6 +339,8 @@ class AsyncAwaker(GanetiBaseAsyncoreDispatcher):
(self.in_socket, self.out_socket) = socket.socketpair(socket.AF_UNIX, (self.in_socket, self.out_socket) = socket.socketpair(socket.AF_UNIX,
self.in_socket.setblocking(0) self.in_socket.setblocking(0)
self.set_socket(self.in_socket) self.set_socket(self.in_socket)
self.need_signal = True self.need_signal = True
self.signal_fn = signal_fn self.signal_fn = signal_fn
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment