SolidOak
SolidOak copied to clipboard
SolidOak built-in terminal does not recognize terminated process
SolidOak built-in terminal does not recognize terminated process
Steps to reproduce:
- build latest master of solidoak on debian testing, as described in README.md.
- create new project, by clicking "New Project" button. A hello world example gets created.
- click "Run" button.
Expected:
- cargo run should compile the project and print "Hello, world!" to the built-in console
Observed:
- project gets compiled, no "Hello, world!" output visible
- built-in console stuck
- when pressing "Stop" button, the ===Finished=== string appears, but no Hello world
Some debugging: (Please note I'm an absolute newbie to rust. Therefore my debugging capabilities are quite limited. Sorry about that.)
- extend the hello world program to one which takes some input (e.g. guessing game example from doc.rust-lang.org), so that the process does not terminate immediately
- after compilation, the program runs, prints out some println and I can enter a string
- after entering a string, the program is supposed to print a message and exit.
- no println message visible, built-in console stuck again
- change solidoak code: builders.rs file, run_builder function to print the pid of the process started by cargo run. Recompile solidoak:
match term.fork_command(project_path_str.as_ref(), args) {
Ok(pid) => {
println!("pid {}",pid);
*current_pid = pid
},
- in the xterm where I started solidoak, I see the pid of the process that was started by cargo run, when I click the "Run" button
- with ps aux | grep PIDNR, I can verify that the program is running
- I enter some string to the built-in console, I expect the process to end
- I can verify with ps that the process actually ended
- The built-in terminal did not recoginze that the process ended: Last println! messages not visible and built-in terminal stuck, I have to press "Stop" button