Mentioned to Eric already but I believe I found a ...
# development
s
Mentioned to Eric already but I believe I found a bug with job control (bash on Ubuntu; haven't tried other shells) and the repl goal. The issue doesn't persist when repl is used without Pants daemon (
./pants --no-pantsd repl
)and is a bit difficult to describe (sufficient to say it doesn't work though). Use of Ctrl-Z does not work with a regular `./pants repl`: portions of commands executed after Ctrl-Z are missing (after several attempts of trying to execute
top
, I ended up with everything from "Command t not found...", "Command o not found..." to "Command toptoppptopo not found" and seemingly random instances of the interpreter coming back into the foreground in an unusable state with the same parsing(?) issues. CtrlC,
reset
, and
fg
don't appear to work.
w
mm, yea, that sounds fairly likely…
pantsd
is aware of when it is operating on a TTY, and tries to address that. but … i have no idea how
Ctrl+Z
is implemented
if you have time to do some research about how
Ctrl+Z
is actually implemented and file a ticket about it, that would be appreciated!
e
SIGSTP
w
oho
e
@steep-breakfast-98857 an issue wuld probably be more useful than this Slack history - which is limited lifetime. You've hit a real problem - I repro.
Ah coke
s
Alrighty -- will do.
h
last time I was looking at the pantsd code, we were checking for like 3 specific signals, none of which were SIGSTP
exception_sink.py
and
remote_pants_runner.py
still have some code referencing signal names directly
yeah we have code specifically checking for one of
SIGINT
SIGQUIT
and
SIGTERM
in
exception_sink.py
and that
interrupts_ignored
method in
remote_pants_runner.py
that checks for
SIGINT
so we might need to add some code there to handle
SIGSTP
properly
s
If no one has a particular interest in addressing this, I'd be happy to look into it at a later point? I'm not sure how trivial it is and I don't have much experience with signals/subprocesses/daemons, but glancing through the
exception_sink.py
code, I think I could get a reasonable start after some reading and definitely learn a lot.
h
signal handling can definitely be tricky, but yeah fixing this might be a good project for you
I would say, create the issue and assign it to yourself if you expect to get to it in the next several weeks (I'm not sure what other work on pants you've coordinated with Eric on working on)
💯 1
if not, having the issue being tracked is still valuable
w
there is a bundle of issues in the category of “`pantsd` does not perfectly support TTYs”… they are probably best looked at in-aggregate, so i wouldn’t recommend grabbing one of them in isolation.
if you have interest in learning more about TTYs, then maybe!
other examples are things like: “`pantsd` doesn’t report the terminal width, so our code can’t set the precise width of text”, and “`ipython` repls crash under
pantsd
, although other repls work fine”