Commit Graph

42 Commits (3f9ea9853ccac24689ef9363828958b992a98ae3)

Author SHA1 Message Date
Roman Perepelitsa d6f8c47761 survive broken $TMPDIR
Roman Perepelitsa f82d0de0d3 remove spurious error messages from _p9k_worker_stop
romkatv b3875f5193 avoid spurious error (even if harmless and invisible) on worker cleanup
romkatv 519de2c569 Revert "close instant prompt descriptors in worker"
This reverts commit 646a826440.
romkatv 646a826440 close instant prompt descriptors in worker
romkatv 3688d12857 `cd` => `cd -q` to survive weird chpwd hooks
romkatv 2cc815deaf 'cd /' in the worker to avoid locking cwd
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.
romkatv d70cc3a24b backport changes to 5.1: procsubstpid doesn't exist there
romkatv 491e630bcb don't send worker pid -- master can get it on its own
romkatv 0a28653355 optimize worker i/o
romkatv 69fce3e1fc speed up worker chatter
romkatv 9fcc380cac make fewer sysread calls
romkatv f01c200e98 rename many _p9k_ vars to _p9k__; trigger state dump when timewarrior and asdf caches change
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.
romkatv fab13389f1 remove profiling instrumentation
romkatv 4b62cd7380 bug fix: make reset=2 sticky
romkatv eb9da89ad9 quote $foo when running with unknown options; fixes
romkatv a9715367d4 fix prompt_char (never showed error); unify options
romkatv 8d2ab89627 remove debugging junk
romkatv 57dc301d6e bug fix: declare worker global vars in _p9k_init_vars
romkatv f1bb5601fe process ready replies from worker synchornously in precmd
romkatv e97a6c6701 delete fifo before killing worker from watchdog
romkatv 2dc56d0afe trap PIPE
romkatv 565492b10e migrate over from the old worker api; use worker in battery on macOS
romkatv 148ecf7fc3 use ascii ENQ (0x05) for watchdog pings
romkatv 45d14cbcf5 add watchdog to worker
romkatv 2aa1d07b4a massive worker simplification (figure out during massive hangover)
romkatv 0f6b7953be synthesize common prompt functions
romkatv e01b5d9529 refactor worker code
romkatv c79108ff0a work around wsl bugs
romkatv 430c2b0178 explicit exec in worker
romkatv 635ffb0e21 load the same modules and functions in worker as in master
romkatv 61df3d1cfb even further simplify worker bootstrap
romkatv 23e8921b8d further simplify worker bootstrap
romkatv 1208fd10ef simplify worker bootstrap
romkatv 0d33157b12 migrate disk_usage and public_ip to worker
romkatv a6e0b01dc1 remove explicit timeout support from worker
romkatv da498aef57 support parallelism in worker
romkatv 145b1a1103 cleanup
romkatv e0e6a4bf49 cleanup
romkatv aa0f435d75 add worker.zsh