Add TODO markers as part of looking at supporting multiple "-d" options (#12).

This commit is contained in:
Andrew Wood
2025-09-15 20:12:55 +01:00
parent 48ac509af7
commit 8771b901d9
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -175,6 +175,7 @@ struct pvstate_s {
off_t rate_limit; /* rate limit, in bytes per second */
size_t target_buffer_size; /* buffer size (0=default) */
off_t size; /* total size of data */
/* TODO: replace watch_pid, watch_fd with an array of structs (#12) */
pid_t watch_pid; /* process to watch fds of */
unsigned int skip_errors; /* skip read errors counter */
int watch_fd; /* fd to watch */
+5
View File
@@ -449,6 +449,11 @@ int pv_watchpid_scanfds(pvstate_t state,
continue;
#endif
/*
* TODO: determine whether fd_to_idx really helps here,
* since it constrains us to fds < FD_SETSIZE.
*/
/* Skip if the fd is outside the array. */
if ((fd < 0) || (fd >= FD_SETSIZE))
continue;