Open nico opened 4 years ago
This might be the shell's fault:
<snip>
Shell(22): Command "./a.out" finished in 59 ms
Shell(40): Command "ls" finished in 10 ms
Terminal::execute_escape_sequence: Unhandled final 'R'
<snip>
./a.out
finishes and the shell should be getting the control backUnhandled final 'R'
makes me suspect that this is also LibLine being somehow unable to read the DSR response (x;yR
- and that thing being printed out)Oddly enough, all this happens only the first time ./a.out
is run - in any terminal.
Put this in Base/home/anon/spawn.cpp, then run
ninja image && ninja run
, and then in Serenity rungcc spawn.cpp && ./a.out
. The program doesn't wait() for its child that's running in a new process group.Somehow, the Shell never gets control back. On Linux, this works fine.
I don't know what correct behavior is though, maybe hanging like this is fine.
If I add this to the bottom (and includes for sys/types.h and sys/wait.h at the top), everything's fine: