Merge pv_watchpid_loop into pv_watchfd_loop, and allow multiple PID / PID:FD sets to be watched at once (#12).

This commit is contained in:
Andrew Wood
2025-09-27 17:55:18 +01:00
parent c49fc4aa57
commit 3ea19829d7
4 changed files with 351 additions and 324 deletions
+1 -1
View File
@@ -619,7 +619,7 @@ int pv_remote_set(pvstate_t);
int pv_watchfd_info(pvstate_t, pvwatchfd_t, bool);
bool pv_watchfd_changed(pvwatchfd_t);
off_t pv_watchfd_position(pvwatchfd_t);
int pv_watchpid_scanfds(pvstate_t, pid_t, int *, pvwatchfd_t *);
int pv_watchpid_scanfds(pvstate_t, pid_t, int, int *, pvwatchfd_t *);
void pv_watchpid_setname(pvstate_t, pvwatchfd_t);
#ifdef __cplusplus
+1 -6
View File
@@ -273,15 +273,10 @@ extern bool pv_sigusr2_received(pvstate_t, pid_t *);
extern int pv_main_loop(pvstate_t);
/*
* Watch the selected file descriptor of the selected process.
* Watch the selected file descriptors of the selected processes.
*/
extern int pv_watchfd_loop(pvstate_t);
/*
* Watch the selected process.
*/
extern int pv_watchpid_loop(pvstate_t);
/*
* Shut down signal handlers after running the main loop.
*/