On Tue, Apr 9, 2013 at 11:56 AM, Wouter Verhelst <[email protected]> wrote: > On 08-04-13 23:19, Paul Clements wrote: >> If you do something like the following in nbd-client just before the >> call to NBD_DO_IT, does this fix the problem: >> >> >> + sigfillset(&block); >> + sigdelset(&block, SIGKILL); >> + sigprocmask(SIG_SETMASK, &block, &old); >> if (ioctl(nbd, NBD_DO_IT) < 0) > > Hmm. I'm not sure if blocking everything except for SIGKILL is the right > thing to do. Shouldn't we at least listen for SIGINT and SIGTERM, too? > And what about SIGPIPE?
Yeah, you're right. For my version of nbd-client, just SIGKILL is fine, but generally whatever signals you don't mind aborting the nbd connection on, you can allow. Note that sometimes nbd-client will block all but SIGKILL anyway (if you're in a network send/recv, NBD_DO_IT masks all but SIGKILL). -- Paul ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
