Skip to content

Commit 5c76d1b

Browse files
committed
ChafaStreamWriter: Fix stalling on closed output pipe (OpenBSD)
1 parent 51e2172 commit 5c76d1b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

chafa/chafa-stream-writer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ safe_write (gint fd, gconstpointer buf, gsize len)
184184
{
185185
if (saved_errno == EAGAIN)
186186
{
187-
# ifdef __gnu_hurd__
188-
/* On GNU/Hurd we get EAGAIN if the remote end closed the pipe,
189-
* and if the pipe is made blocking it simply stalls. This makes
190-
* our >&- redirection test fail. Therefore we bail out here
191-
* as the least bad option. */
187+
# if defined(__gnu_hurd__) || defined(__OpenBSD__)
188+
/* On GNU/Hurd and OpenBSD we get EAGAIN if the remote end
189+
* closed the pipe, and if the pipe is made blocking it
190+
* simply stalls. This makes our >&- redirection test fail.
191+
* Therefore we bail out here as the least bad option. */
192192
goto out;
193193
# else
194194
/* It's a nonblocking pipe; wait for it to become ready,

0 commit comments

Comments
 (0)