Closed jserv closed 2 years ago
wow thanks! It works a lot better, although iI still get one error, after exiting it says "a -- Press HELP", do you see that too?
wow thanks! It works a lot better, although iI still get one error, after exiting it says "a -- Press HELP", do you see that too?
Yes, I saw that message. Maybe I should check the return value properly.
I think unset_raw_mode() isn't working for some reason... maybe the terminal is still sending input events and the unexpected input is causing that error?
This termios stuff is a real pain to debug, but maybe if that starts working the stty sane
won't be necessary..? Give me chance to figure that out and then we'll see if the "a -- press help" thing goes away.
I think that error is coming from the SIGCHLD handler, I think if we just signal(SIGCHLD, SIG_DFL) it will go away? I have a patch that does that and cleans up rawmode. I can't work on this until tonight, I'll push the updates then!
Just a random thought I haven't tested.. could the puts()
with control codes be replaced with reset_shell_mode()/reset_prog_mode()? No problem if it doesn't work, would just look a bit neater!
I think that error is coming from the SIGCHLD handler, I think if we just signal(SIGCHLD, SIG_DFL) it will go away? I have a patch that does that and cleans up rawmode. I can't work on this until tonight, I'll push the updates then!
I have added signal(SIGCHLD, SIG_DFL)
into this patch, and it works as expected.
Without tput cnorm
, the cursor would hide completely. So, I attempt to run it before launching the real shell process.
@taviso, I suddenly deleted my forked repository, and this pull request was closed corresponding. Please reopen if you think it was useful.
Oops - no problem, I was working on it and trying to test with macros. The patch works, I was just experimenting with it to see if there was a way to do it without the escape codes!
"/System" is supposed to redirect to a command shell, useful for macros. However, the terminal would mess up. Symbol "symbol" is now overridden by the combination of termio and posix_spawn, which respect the original terminal configurations.
Close #15