From 931912dcf6bb8377d82c8de9c68c8e34138d18cb Mon Sep 17 00:00:00 2001 From: NRK Date: Wed, 5 Jun 2024 19:40:58 +0000 Subject: make pipes non-blocking and read output on POLLHUP (#490) this makes it so that script outputs are read when the script actually finishes. one objection to reading on POLLHUP was that the script might fill up the pipe and get stuck. we already mark the read-end as non-blocking on our end so might as well make the write-end non-blocking as well which avoids the script getting blocked after (and if) it fills up the pipe. ref: https://codeberg.org/nsxiv/nsxiv/pulls/334 Closes: https://codeberg.org/nsxiv/nsxiv/issues/377 Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/490 Reviewed-by: eylles --- nsxiv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nsxiv.h') diff --git a/nsxiv.h b/nsxiv.h index 3ffc113..fc0720c 100644 --- a/nsxiv.h +++ b/nsxiv.h @@ -356,7 +356,7 @@ int r_closedir(r_dir_t*); char* r_readdir(r_dir_t*, bool); int r_mkdir(char*); void construct_argv(char**, unsigned int, ...); -pid_t spawn(int*, int*, char *const []); +pid_t spawn(int*, int*, int, char *const []); /* window.c */ -- cgit v1.2.3-54-g00ecf