Kovid Goyal
97d7329d14
A nicer fix for kitty @ ls | less
...
We rely on the fact that cfmakeraw() and less's code to put the tty in
raw state diverge. This is obv a hack but then so is kitty @ ls | less
This hack allows
kitty +kitten clipboard --get-clipboard > output
to work.
2022-08-02 18:33:53 +05:30
Kovid Goyal
609d42e2bc
Ignore EAGAIN when doing tty io
2022-08-02 17:21:28 +05:30
Kovid Goyal
3463931dad
Rewrite clipboard kitten to only change termios settings while it is actually reading from terminal
2022-08-02 17:14:27 +05:30
Kovid Goyal
f637bf2377
socket prewarm: Dont control the tty if STDOUT is not a tty
...
This is because we could be being piped to a program like less that does
want to control the tty itself
2022-08-02 14:09:34 +05:30
Kovid Goyal
2271eb5e60
Document KITTY_PREWARM_SOCKET_REAL_TTY
2022-08-02 08:38:07 +05:30
Kovid Goyal
a5cbb552f0
Allow prewarming of kitty @ commands
2022-08-01 19:47:28 +05:30
Kovid Goyal
e43ca5b031
Add an implementation using splice() for in-kernel tty copies
...
Sadly splice is currently not functional in Linux, so the implementation
is turned off
2022-08-01 19:16:51 +05:30
Kovid Goyal
cc7e668ad6
Cleanup editing of proc environ
2022-08-01 19:03:03 +05:30
Kovid Goyal
a01dbbdf04
Fix launcher not building universal
2022-08-01 19:03:03 +05:30
Kovid Goyal
e0ce0a67cc
ensure setting KITTY_PREWARM_SOCKET_REAL_TTY does not clobber the environ
2022-08-01 19:03:03 +05:30
Kovid Goyal
0d83a8866b
Make setting the real tty name more robust
2022-08-01 19:03:03 +05:30
Kovid Goyal
f7a7e39a36
prewarm wrapper should indicate it is active via the process environment
2022-08-01 19:03:03 +05:30
Kovid Goyal
67cb466ea9
...
2022-08-01 19:03:03 +05:30
Kovid Goyal
376688ab9f
Add a test for SIGTSTP via ctrl-z
2022-08-01 19:03:03 +05:30
Kovid Goyal
8668087d15
flush data when exiting on signal as well
...
should make the signal tests less flaky
2022-08-01 19:03:03 +05:30
Kovid Goyal
9b1c23987c
Fix stdout line_buffering incorrect when parent kitty instance has its stdout redirected to a file
2022-08-01 19:03:03 +05:30
Kovid Goyal
784daa1a4b
Update changelog for socket prewarm
2022-08-01 19:03:03 +05:30
Kovid Goyal
06f9b73a7b
Workaround mypy bug
2022-08-01 19:03:03 +05:30
Kovid Goyal
62c0272df2
Get test.py working when prewarm socket is in operation
2022-08-01 19:03:03 +05:30
Kovid Goyal
7ce2b4c641
Indicate in kitty_run_data we are prewarmed
2022-08-01 19:03:03 +05:30
Kovid Goyal
08c2de541f
Nicer establish_controlling_tty
2022-08-01 19:03:03 +05:30
Kovid Goyal
94551623ec
Make JSON reading test a bit more robust
2022-08-01 19:03:02 +05:30
Kovid Goyal
cb0d23bae8
Use sub tests for the various prewarm things
2022-08-01 19:03:02 +05:30
Kovid Goyal
cb5157f2d1
Nicer implementation of eintr_retry that does not prevent type checking of wrapped functions arguments
2022-08-01 19:03:02 +05:30
Kovid Goyal
32dcbbb5e1
...
2022-08-01 19:03:02 +05:30
Kovid Goyal
4eedf0d36c
macOS needs SIGTTOU SIGTTIN explicitly ignored to allow the supervisor to use TIOCSWINSZ
2022-08-01 19:03:02 +05:30
Kovid Goyal
be458303c5
Debounce WINSZ events
2022-08-01 19:03:02 +05:30
Kovid Goyal
78542ede14
Separate test for SIGWINCH handling
2022-08-01 19:03:02 +05:30
Kovid Goyal
df8800b7ff
tcsetpgrp can raise EINTR despite python claiming to auto retry
2022-08-01 19:03:02 +05:30
Kovid Goyal
9c30cd8891
Use a process supervisor for socket workers
...
This simplifies the code and also allows SIGTSTP to work as the worker
process is no longer in an orphaned process group.
2022-08-01 19:03:02 +05:30
Kovid Goyal
dda28efd66
Use the same signal to stop as stopped the child
2022-08-01 19:03:02 +05:30
Kovid Goyal
b78183972c
Report child stop to wrapper process
2022-08-01 19:03:02 +05:30
Kovid Goyal
fc06196a3e
Restore termios state when stopping
2022-08-01 19:03:02 +05:30
Kovid Goyal
2a1809a2d8
When exiting with a signal run cleanup
2022-08-01 19:03:02 +05:30
Kovid Goyal
ac5c312267
Work on handling child stop events
2022-08-01 19:03:02 +05:30
Kovid Goyal
8f3174038b
Fix running of test suite inside kitty
2022-08-01 19:03:02 +05:30
Kovid Goyal
2d8113e0e0
Give up on signal delivery tests
2022-08-01 19:03:02 +05:30
Kovid Goyal
e881850bb4
...
2022-08-01 19:03:02 +05:30
Kovid Goyal
4cbae1db89
...
2022-08-01 19:03:02 +05:30
Kovid Goyal
97bce7be18
and again
2022-08-01 19:03:01 +05:30
Kovid Goyal
5d2a276172
...
2022-08-01 19:03:01 +05:30
Kovid Goyal
762dfe8315
increase timeout since signal delivery on CI is flakey
2022-08-01 19:03:01 +05:30
Kovid Goyal
1c0d1ec8a9
wait for child events explicitly
2022-08-01 19:03:01 +05:30
Kovid Goyal
e650699217
py3.8 compat
2022-08-01 19:03:01 +05:30
Kovid Goyal
5ff2b5be1c
Clear out any signals before ending test
2022-08-01 19:03:01 +05:30
Kovid Goyal
f1841d7c81
DRYer
2022-08-01 19:03:01 +05:30
Kovid Goyal
fd6231a778
Fix signal reading in prewarm wrapper
2022-08-01 19:03:01 +05:30
Kovid Goyal
751a52153d
Restore python signal handlers properly after the test
2022-08-01 19:03:01 +05:30
Kovid Goyal
61b733bae9
Add a test for SIGCHLD on SIGTSTP
2022-08-01 19:03:01 +05:30
Kovid Goyal
624e96df9b
wrapper process should exit with signal if prewarmed worker exits with signal
2022-08-01 19:03:01 +05:30