aboutsummaryrefslogtreecommitdiffstats
path: root/nsxiv.h
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2024-06-05 21:40:58 +0200
committerNRK <nrk@disroot.org>2024-06-05 21:40:58 +0200
commit931912dcf6bb8377d82c8de9c68c8e34138d18cb (patch)
treebd253ed2baec08a3f38e19a83528a8771c51c44f /nsxiv.h
parent65acb98396b7eb8e7b22140061c799dbd0de8a3e (diff)
downloadnsxiv-931912dcf6bb8377d82c8de9c68c8e34138d18cb.tar.zst
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 <eylles@noreply.codeberg.org>
Diffstat (limited to 'nsxiv.h')
-rw-r--r--nsxiv.h2
1 files changed, 1 insertions, 1 deletions
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 */