mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
gspawn: Retry on EBUSY errors from dup2()
`man dup2` says that on Linux, dup2() can return `EBUSY` if the operation needs to be retried (in addition to returning `EINTR` in other cases where it needs to be retried). Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
eae72c3597
commit
1097b50c1c
@ -1297,7 +1297,7 @@ sane_dup2 (gint fd1, gint fd2)
|
||||
|
||||
do
|
||||
ret = dup2 (fd1, fd2);
|
||||
while (ret < 0 && errno == EINTR);
|
||||
while (ret < 0 && (errno == EINTR || errno == EBUSY));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user