Add --watchfd option values to an array in the main state, as well as to the currently used variables (#12).

This commit is contained in:
Andrew Wood
2025-09-17 23:12:13 +01:00
parent 12cc996d32
commit dbce5b355e
5 changed files with 75 additions and 10 deletions
+7
View File
@@ -387,6 +387,13 @@ int main(int argc, char **argv)
pv_state_inputfiles(state, opts->argc, (const char **) (opts->argv));
}
/*
* Put the list of watchfd items into the PV internal state.
*/
if ((opts->watchfd_count > 0) && (NULL != opts->watchfd_pid) && (NULL != opts->watchfd_fd)) {
pv_state_watchfds(state, opts->watchfd_count, opts->watchfd_pid, opts->watchfd_fd);
}
/*
* If stderr is not a terminal and we're neither forcing output nor
* outputting numerically, we will have nothing to display at all.