diff options
author | наб <[email protected]> | 2021-05-19 13:56:24 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-05-21 09:47:53 -0700 |
commit | 30dadd5c04be1f88c5fa6ab7f32b7573a9eee981 (patch) | |
tree | 3975bf4a297fb2f662ffb91037118b062dd423cd /man | |
parent | e72383825bbd48524bef19feb9893cdb05107f15 (diff) |
libzfs: run_process: set O_NONBLOCK on lines pipe
Without this, we can deadlock: the child is stuck writing to the pipe,
and we are stuck waiting on the child
With this, we the child fills up the pipe (a few hundred kBish)
and starts getting EAGAINs, which allows it to either crash
or ignore them
libzfs_run_process_get_stdout*() is used only by zpool -c scripts,
which output short runs of K=V pairs, so the likelihood of losing
legitimate data there is relatively low
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12082
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions