mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-26 14:00:56 +00:00
(debug_signal_handler): New function; toggles debug_flag.
(main): Handle SIGUSR1 with that.
This commit is contained in:
parent
b4890bdb1c
commit
3fb9ebf83f
1 changed files with 14 additions and 0 deletions
14
main.c
14
main.c
|
@ -397,6 +397,15 @@ enter_command_line_file (name)
|
|||
return enter_file (savestring (name, strlen (name)));
|
||||
}
|
||||
|
||||
/* Toggle -d on receipt of SIGUSR1. */
|
||||
|
||||
static RETSIGTYPE
|
||||
debug_signal_handler (sig)
|
||||
int sig;
|
||||
{
|
||||
debug_flag = ! debug_flag;
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv, envp)
|
||||
int argc;
|
||||
|
@ -744,6 +753,11 @@ main (argc, argv, envp)
|
|||
(void) signal (SIGCLD, child_handler);
|
||||
#endif
|
||||
|
||||
/* Let the user send us SIGUSR1 to toggle the -d flag during the run. */
|
||||
#ifdef SIGUSR1
|
||||
(void) signal (SIGUSR1, debug_signal_handler);
|
||||
#endif
|
||||
|
||||
/* Define the initial list of suffixes for old-style rules. */
|
||||
|
||||
set_default_suffixes ();
|
||||
|
|
Loading…
Reference in a new issue