diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-07-30 14:45:08 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-07-30 14:45:08 +0000 |
commit | 3e13edd587f39846fc4f99539c4b7aa0da5d16dd (patch) | |
tree | 49f3c8f9c8c68445fc57863c1a0939ed85ef4704 /src | |
parent | 1d605879a1c408422e38e7cf10f5a2682f8780aa (diff) | |
download | gnunet-3e13edd587f39846fc4f99539c4b7aa0da5d16dd.tar.gz gnunet-3e13edd587f39846fc4f99539c4b7aa0da5d16dd.zip |
nicer names for C-dog
Diffstat (limited to 'src')
-rw-r--r-- | src/util/scheduler.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 9623382f7..6e74cc5a7 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -621,12 +621,10 @@ run_ready (struct GNUNET_SCHEDULER_Handle *sched, | |||
621 | /** | 621 | /** |
622 | * Pipe used to communicate shutdown via signal. | 622 | * Pipe used to communicate shutdown via signal. |
623 | */ | 623 | */ |
624 | static struct GNUNET_DISK_PipeHandle *sigpipe; | 624 | static struct GNUNET_DISK_PipeHandle *shutdown_pipe_handle; |
625 | 625 | ||
626 | /** | 626 | /** |
627 | * Signal handler called for sigpipe. | 627 | * Signal handler called for SIGPIPE. |
628 | * | ||
629 | * FIXME: what should we do here? | ||
630 | */ | 628 | */ |
631 | static void | 629 | static void |
632 | sighandler_pipe () | 630 | sighandler_pipe () |
@@ -643,7 +641,7 @@ sighandler_shutdown () | |||
643 | static char c; | 641 | static char c; |
644 | 642 | ||
645 | GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle | 643 | GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle |
646 | (sigpipe, GNUNET_DISK_PIPE_END_WRITE), &c, | 644 | (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_WRITE), &c, |
647 | sizeof (c)); | 645 | sizeof (c)); |
648 | } | 646 | } |
649 | 647 | ||
@@ -682,10 +680,10 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
682 | 680 | ||
683 | rs = GNUNET_NETWORK_fdset_create (); | 681 | rs = GNUNET_NETWORK_fdset_create (); |
684 | ws = GNUNET_NETWORK_fdset_create (); | 682 | ws = GNUNET_NETWORK_fdset_create (); |
685 | GNUNET_assert (sigpipe == NULL); | 683 | GNUNET_assert (shutdown_pipe_handle == NULL); |
686 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO); | 684 | shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_NO); |
687 | GNUNET_assert (sigpipe != NULL); | 685 | GNUNET_assert (shutdown_pipe_handle != NULL); |
688 | pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); | 686 | pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_READ); |
689 | GNUNET_assert (pr != NULL); | 687 | GNUNET_assert (pr != NULL); |
690 | shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, &sighandler_pipe); | 688 | shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, &sighandler_pipe); |
691 | shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown); | 689 | shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown); |
@@ -764,8 +762,8 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
764 | GNUNET_SIGNAL_handler_uninstall (shc_quit); | 762 | GNUNET_SIGNAL_handler_uninstall (shc_quit); |
765 | GNUNET_SIGNAL_handler_uninstall (shc_hup); | 763 | GNUNET_SIGNAL_handler_uninstall (shc_hup); |
766 | #endif | 764 | #endif |
767 | GNUNET_DISK_pipe_close (sigpipe); | 765 | GNUNET_DISK_pipe_close (shutdown_pipe_handle); |
768 | sigpipe = NULL; | 766 | shutdown_pipe_handle = NULL; |
769 | GNUNET_NETWORK_fdset_destroy (rs); | 767 | GNUNET_NETWORK_fdset_destroy (rs); |
770 | GNUNET_NETWORK_fdset_destroy (ws); | 768 | GNUNET_NETWORK_fdset_destroy (ws); |
771 | } | 769 | } |