1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-14 00:50:08 +00:00
Commit graph

29 commits

Author SHA1 Message Date
romkatv
f01c200e98 rename many _p9k_ vars to _p9k__; trigger state dump when timewarrior and asdf caches change 2020-02-10 12:59:37 +01:00
romkatv
7354eeaa96 workaround for a bug in sysread
There is a bug in sysread from zsh/system. It triggers in the
following case:

1. zsh has been compiled with HAVE_SELECT and without HAVE_POLL.
2. sysread is called with timeout (-t).
3. the input file descriptor is valid but there is no data to read.
4. errno happens to be EINTR prior to the call to sysread.

This results in an infinite loop in sysread:

  while ((ret = select(infd+1, (SELECT_ARG_2_T) &fds,
                       NULL, NULL,&select_tv)) < 1) {
    if (errno != EINTR || errflag || retflag || breaks || contflag)
      break;
  }

Here select() keeps returning 0, indicating timeout. This is not an
error, so errno doesn't get set. If it was EINTR prior to the call,
it stays EINTR, and the loop keeps spinning.

As a workaround, powerlevel10k sets errno to ENOTTY (any value other
than EINTR will do) prior to calling sysread with timeout.
2020-02-05 14:37:43 +01:00
romkatv
fab13389f1 remove profiling instrumentation 2020-02-03 16:16:45 +01:00
romkatv
4b62cd7380 bug fix: make reset=2 sticky 2020-02-03 11:47:39 +01:00
romkatv
eb9da89ad9 quote $foo when running with unknown options; fixes #453 2020-02-01 22:03:42 +01:00
romkatv
a9715367d4 fix prompt_char (never showed error); unify options 2020-01-26 16:54:52 +01:00
romkatv
8d2ab89627 remove debugging junk 2020-01-26 15:24:13 +01:00
romkatv
57dc301d6e bug fix: declare worker global vars in _p9k_init_vars 2020-01-26 11:46:35 +01:00
romkatv
f1bb5601fe process ready replies from worker synchornously in precmd 2020-01-25 12:51:46 +01:00
romkatv
e97a6c6701 delete fifo before killing worker from watchdog 2020-01-25 12:18:15 +01:00
romkatv
2dc56d0afe trap PIPE 2020-01-25 11:12:30 +01:00
romkatv
565492b10e migrate over from the old worker api; use worker in battery on macOS 2020-01-25 11:01:14 +01:00
romkatv
148ecf7fc3 use ascii ENQ (0x05) for watchdog pings 2020-01-25 08:03:28 +01:00
romkatv
45d14cbcf5 add watchdog to worker 2020-01-25 07:52:12 +01:00
romkatv
2aa1d07b4a massive worker simplification (figure out during massive hangover) 2020-01-24 19:47:01 +01:00
romkatv
0f6b7953be synthesize common prompt functions 2020-01-20 23:37:03 +01:00
romkatv
e01b5d9529 refactor worker code 2020-01-20 20:12:05 +01:00
romkatv
c79108ff0a work around wsl bugs 2020-01-19 21:16:26 +01:00
romkatv
430c2b0178 explicit exec in worker 2020-01-19 19:28:42 +01:00
romkatv
635ffb0e21 load the same modules and functions in worker as in master 2020-01-19 13:56:45 +01:00
romkatv
61df3d1cfb even further simplify worker bootstrap 2020-01-19 13:49:54 +01:00
romkatv
23e8921b8d further simplify worker bootstrap 2020-01-19 13:14:58 +01:00
romkatv
1208fd10ef simplify worker bootstrap 2020-01-19 11:53:10 +01:00
romkatv
0d33157b12 migrate disk_usage and public_ip to worker 2020-01-18 15:41:43 +01:00
romkatv
a6e0b01dc1 remove explicit timeout support from worker 2020-01-18 12:08:48 +01:00
romkatv
da498aef57 support parallelism in worker 2020-01-18 11:09:18 +01:00
romkatv
145b1a1103 cleanup 2020-01-17 19:17:23 +01:00
romkatv
e0e6a4bf49 cleanup 2020-01-17 19:14:28 +01:00
romkatv
aa0f435d75 add worker.zsh 2020-01-17 19:01:17 +01:00