[pacman-dev] [PATCH v2] Hide cursor while pacman is running

Anatol Pomozov anatol.pomozov at gmail.com
Mon Mar 9 18:59:40 UTC 2020


Hi

On Mon, Mar 9, 2020 at 2:58 AM Allan McRae <allan at archlinux.org> wrote:
>
> On 9/3/20 7:48 pm, Ralph Corderoy wrote:
> > Hi,
> >
> >> +void console_hide_cursor(void) {
> >> +       if(isatty(fileno(stdout))) {
> >> +               printf("\x1B[?25l");
> >> +       }
> >
> > This is an ioctl(2) each time.
> > Can stdout be assumed not to change and just tested once?
>
> This is only called when pacman wants input.  Which is a small number of
> times in a transaction, and the human is the rate limiting step.

Yep, this function is called at the pacman start and when we expect an
input from user i.e. a couple of times during `pacman` execution.

Allan, a new version of the patch has been sent to the maillist. PTAL.


More information about the pacman-dev mailing list