/**
* Pipe used to communicate shutdown via signal.
*/
-static struct GNUNET_DISK_PipeHandle *sigpipe;
+static struct GNUNET_DISK_PipeHandle *shutdown_pipe_handle;
/**
- * Signal handler called for sigpipe.
- *
- * FIXME: what should we do here?
+ * Signal handler called for SIGPIPE.
*/
static void
sighandler_pipe ()
static char c;
GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle
- (sigpipe, GNUNET_DISK_PIPE_END_WRITE), &c,
+ (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_WRITE), &c,
sizeof (c));
}
rs = GNUNET_NETWORK_fdset_create ();
ws = GNUNET_NETWORK_fdset_create ();
- GNUNET_assert (sigpipe == NULL);
- sigpipe = GNUNET_DISK_pipe (GNUNET_NO);
- GNUNET_assert (sigpipe != NULL);
- pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ);
+ GNUNET_assert (shutdown_pipe_handle == NULL);
+ shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_NO);
+ GNUNET_assert (shutdown_pipe_handle != NULL);
+ pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_READ);
GNUNET_assert (pr != NULL);
shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, &sighandler_pipe);
shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown);
GNUNET_SIGNAL_handler_uninstall (shc_quit);
GNUNET_SIGNAL_handler_uninstall (shc_hup);
#endif
- GNUNET_DISK_pipe_close (sigpipe);
- sigpipe = NULL;
+ GNUNET_DISK_pipe_close (shutdown_pipe_handle);
+ shutdown_pipe_handle = NULL;
GNUNET_NETWORK_fdset_destroy (rs);
GNUNET_NETWORK_fdset_destroy (ws);
}