MCPcopy Create free account
hub / github.com/coreutils/coreutils / process_signals

Function process_signals

src/dd.c:949–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

947 unbounded amount of time when signals are not being processed. */
948
949static void
950process_signals (void)
951{
952 while (interrupt_signal || info_signal_count)
953 {
954 int interrupt;
955 int infos;
956 sigset_t oldset;
957
958 sigprocmask (SIG_BLOCK, &caught_signals, &oldset);
959
960 /* Reload interrupt_signal and info_signal_count, in case a new
961 signal was handled before sigprocmask took effect. */
962 interrupt = interrupt_signal;
963 infos = info_signal_count;
964
965 if (infos)
966 info_signal_count = infos - 1;
967
968 sigprocmask (SIG_SETMASK, &oldset, NULL);
969
970 if (interrupt)
971 cleanup ();
972 print_stats ();
973 if (interrupt)
974 raise (interrupt);
975 }
976}
977
978static void
979finish_up (void)

Callers 8

finish_upFunction · 0.70
ireadFunction · 0.70
iwriteFunction · 0.70
ifdatasyncFunction · 0.70
ifd_reopenFunction · 0.70
ifstatFunction · 0.70
ifsyncFunction · 0.70
iftruncateFunction · 0.70

Calls 2

print_statsFunction · 0.85
cleanupFunction · 0.70

Tested by

no test coverage detected