flexnbd serve: Make the killswitch per-client-thread
This is a bit tricky, but calling shutdown() on a socket in a signal handler is safe, and (at least in linux) appears to cause any read() or write() calls blocked on that socket to return, even with SA_RESTART. I'm not confident enough about the rest of flexnbd's syscall error handling to turn SA_RESTART off for this signal...
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "mirror.h"
|
||||
#include "serve.h"
|
||||
#include "proxy.h"
|
||||
#include "client.h"
|
||||
#include "self_pipe.h"
|
||||
#include "mbox.h"
|
||||
#include "control.h"
|
||||
|
Reference in New Issue
Block a user