[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed ou
From: |
Arsen Arsenović |
Subject: |
Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed outputs |
Date: |
Wed, 01 Mar 2023 10:25:25 +0100 |
Morning Padraig,
Pádraig Brady <P@draigBrady.com> writes:
> I'm squashing in the following to handle illumos and macOS.
> Also it decouples the code from the pollfd structure layout,
> by using C99 designated initializers.
Thanks. I read over the patches you attached and they seem reasonable.
Thanks for working on getting this merged, have a great day!
> cheers,
> Pádraig
>
> diff --git a/src/iopoll.c b/src/iopoll.c
> index 916241f89..ceb1b43ad 100644
> --- a/src/iopoll.c
> +++ b/src/iopoll.c
> @@ -49,7 +49,10 @@
> extern int
> iopoll (int fdin, int fdout)
> {
> - struct pollfd pfds[2] = {{fdin, POLLIN, 0}, {fdout, 0, 0}};
> + struct pollfd pfds[2] = { /* POLLRDBAND needed for illumos, macOS. */
> + { .fd = fdin, .events = POLLIN | POLLRDBAND, .revents = 0 },
> + { .fd = fdout, .events = POLLRDBAND, .revents = 0 },
> + };
>
> while (poll (pfds, 2, -1) > 0 || errno == EINTR)
> {
--
Arsen Arsenović
signature.asc
Description: PGP signature
- Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed outputs,
Arsen Arsenović <=