From: Job Snijders Subject: Re: responsive watch wip To: Ted Unangst Cc: tech@openbsd.org Date: Sat, 21 Jun 2025 08:13:50 +0000 Hi, On Sat, Jun 21, 2025 at 12:46:34AM -0400, Ted Unangst wrote: > @@ -216,19 +232,19 @@ main(int argc, char *argv[]) > signal_set(&ev_sighup, SIGHUP, on_signal, NULL); > signal_set(&ev_sigterm, SIGTERM, on_signal, NULL); > signal_set(&ev_sigwinch, SIGWINCH, on_signal, NULL); > + signal_set(&ev_sigchild, SIGCHLD, on_sigchild, NULL); > signal_add(&ev_sigint, NULL); > signal_add(&ev_sighup, NULL); > signal_add(&ev_sigterm, NULL); > signal_add(&ev_sigwinch, NULL); > + signal_add(&ev_sigchild, NULL); > > event_set(&ev_stdin, STDIN_FILENO, EV_READ | EV_PERSIST, input, NULL); > event_add(&ev_stdin, NULL); > evtimer_set(&ev_timer, timer, NULL); > - evtimer_add(&ev_timer, &opt_interval.tv); > > cur_buf = &buf0; prev_buf = &buf1; > - read_result(cur_buf); > - display(cur_buf, prev_buf, highlight_mode); > + start_child(); I think it may be better to _not_ remove this call to display(), so that the 'title bar' immediately is displayed while the program waits for the first line of output emitted by the child. other than that, OK job@