Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ void parse_args(int argc, char *argv[])
if(argc == 2 && strcmp(argv[1], "sigtest") == 0)
exit(sigtest());

// Print the value of SIGRTMIN, for use in the scripts to avoid issues
// caused by its inconsistent value across environments
if(argc == 2 && strcmp(argv[1], "sigrtmin") == 0)
exit(sigrtmin());

// If the binary name is "sqlite3" (e.g., symlink /usr/bin/sqlite3 -> /usr/bin/pihole-FTL),
// we operate in drop-in mode and consume all arguments for the embedded SQLite3 engine
// Also, we do this if the first argument is a file with ".db" ending
Expand Down
6 changes: 6 additions & 0 deletions src/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@ int sigtest(void)
return EXIT_SUCCESS;
}

int sigrtmin(void)
{
printf("%d\n", SIGRTMIN);
return EXIT_SUCCESS;
}

void restart_ftl(const char *reason)
{
log_info("Restarting FTL: %s", reason);
Expand Down
1 change: 1 addition & 0 deletions src/signals.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pid_t main_pid(void);
void thread_sleepms(const enum thread_types thread, const int milliseconds);
void generate_backtrace(void);
int sigtest(void);
int sigrtmin(void);
void restart_ftl(const char *reason);
pid_t debugger(void);

Expand Down
Loading