Commit Graph

42 Commits (master)

Author SHA1 Message Date
Roman Perepelitsa d6f8c47761 survive broken $TMPDIR 3 years ago
Roman Perepelitsa f82d0de0d3 remove spurious error messages from _p9k_worker_stop 4 years ago
romkatv b3875f5193 avoid spurious error (even if harmless and invisible) on worker cleanup 4 years ago
romkatv 519de2c569 Revert "close instant prompt descriptors in worker"
This reverts commit 646a826440.
4 years ago
romkatv 646a826440 close instant prompt descriptors in worker 4 years ago
romkatv 3688d12857 `cd` => `cd -q` to survive weird chpwd hooks 4 years ago
romkatv 2cc815deaf 'cd /' in the worker to avoid locking cwd 4 years ago
romkatv 06603a2d62 work around bugs in kitty where it hangs on close
All terminals quit when the child process terminates. Except
kitty. Kitty doesn't quit until there are no open file
descriptors to the tty.

And the best thing? This is "better". Having the balls to
claim this nasty bug as feature is worthy of admiration.
4 years ago
romkatv d70cc3a24b backport changes to 5.1: procsubstpid doesn't exist there 5 years ago
romkatv 491e630bcb don't send worker pid -- master can get it on its own 5 years ago
romkatv 0a28653355 optimize worker i/o 5 years ago
romkatv 69fce3e1fc speed up worker chatter 5 years ago
romkatv 9fcc380cac make fewer sysread calls 5 years ago
romkatv f01c200e98 rename many _p9k_ vars to _p9k__; trigger state dump when timewarrior and asdf caches change 5 years ago
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.
5 years ago
romkatv fab13389f1 remove profiling instrumentation 5 years ago
romkatv 4b62cd7380 bug fix: make reset=2 sticky 5 years ago
romkatv eb9da89ad9 quote $foo when running with unknown options; fixes #453 5 years ago
romkatv a9715367d4 fix prompt_char (never showed error); unify options 5 years ago
romkatv 8d2ab89627 remove debugging junk 5 years ago
romkatv 57dc301d6e bug fix: declare worker global vars in _p9k_init_vars 5 years ago
romkatv f1bb5601fe process ready replies from worker synchornously in precmd 5 years ago
romkatv e97a6c6701 delete fifo before killing worker from watchdog 5 years ago
romkatv 2dc56d0afe trap PIPE 5 years ago
romkatv 565492b10e migrate over from the old worker api; use worker in battery on macOS 5 years ago
romkatv 148ecf7fc3 use ascii ENQ (0x05) for watchdog pings 5 years ago
romkatv 45d14cbcf5 add watchdog to worker 5 years ago
romkatv 2aa1d07b4a massive worker simplification (figure out during massive hangover) 5 years ago
romkatv 0f6b7953be synthesize common prompt functions 5 years ago
romkatv e01b5d9529 refactor worker code 5 years ago
romkatv c79108ff0a work around wsl bugs 5 years ago
romkatv 430c2b0178 explicit exec in worker 5 years ago
romkatv 635ffb0e21 load the same modules and functions in worker as in master 5 years ago
romkatv 61df3d1cfb even further simplify worker bootstrap 5 years ago
romkatv 23e8921b8d further simplify worker bootstrap 5 years ago
romkatv 1208fd10ef simplify worker bootstrap 5 years ago
romkatv 0d33157b12 migrate disk_usage and public_ip to worker 5 years ago
romkatv a6e0b01dc1 remove explicit timeout support from worker 5 years ago
romkatv da498aef57 support parallelism in worker 5 years ago
romkatv 145b1a1103 cleanup 5 years ago
romkatv e0e6a4bf49 cleanup 5 years ago
romkatv aa0f435d75 add worker.zsh 5 years ago