Re: Issues with sndioctl -m output

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Mon, 7 Sep 2020 09:43:12 +0200
On Sun, Sep 06, 2020 at 11:31:53AM -0300, …rico Nogueira wrote:
> On Sun Sep 6, 2020 at 7:54 AM -03, Alexandre Ratchov wrote:
> > Hi,
> >
> > The "setlinebuf(stdout)" call is missing when the loop correstponding
> > to -m starts. Does this works for you?
> >
> > diff --git a/sndioctl/sndioctl.c b/sndioctl/sndioctl.c
> > index 4c4a85a..71ae298 100644
> > --- a/sndioctl/sndioctl.c
> > +++ b/sndioctl/sndioctl.c
> > _at_@ -1014,6 +1014,7 @@ main(int argc, char **argv)
> > perror("malloc");
> > exit(1);
> > }
> > + setlinebuf(stdout);
> > for (;;) {
> > nfds = sioctl_pollfd(hdl, pfds, POLLIN);
> > if (nfds == 0)
> 
> It doesn't seem to make any difference, unfortunately. Following
> Duncan's idea does seem to work, however:
> 
> diff --git a/sndioctl/sndioctl.c b/sndioctl/sndioctl.c
> index 4c4a85a..71ae298 100644
> --- sndioctl/sndioctl.c
> +++ sndioctl/sndioctl.c
> _at_@ -1014,6 +1014,7 @@ main(int argc, char **argv)
>                         perror("malloc");
>                         exit(1);
>                 }
>                 for (;;) {
> +                       fflush(stdout);
>                         nfds = sioctl_pollfd(hdl, pfds, POLLIN);
>                         if (nfds == 0)
> 

Thanks, committed
Received on Mon Sep 07 2020 - 09:43:12 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 08 2020 - 01:33:26 CEST