-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reimplement how stdin is read on the cli #216
Conversation
Note that I'm limited in how much testing I can do as I'm not setup to build on windows/osx. |
Could we just get rid of listening to stdin? The previous setup of waiting for some symbol is rather uncommon approach and I wonder if that feature is actually used by anyone. |
I think I misread your initial proposal of removing listening to stdin in daemon mode in #200 (comment) as removing listening to stdin altogether. Sorry for the wasted time :-( |
So should I merge this PR? |
No, let's see what @jwestfall69 replies and also we need testing. |
I was originally hoping to just nuke the stdin reading, but when going through the processing of removing the code I found the GUI was relying on it. In the GUI when you 'start' its spawning (QProcess) barrierc or barriers as a sub process. When the user wants to stop in the GUI, the GUI sends the 'S' char to the stdin of the spawned process to signal to it to shutdown/exit. barrier/src/gui/src/MainWindow.cpp Lines 727 to 732 in 4dedd88
Suppose we could try ditching the stdin bits and just trying to close() the sub process, which the qt docs say will kill it. |
Okay, keeping stdin processing makes sense then, for now :-) The PR looks good to me, just needs testing on windows and osx. |
I would note that the shutdown process (unrelated to this PR) on OSX results in a segfault, which will make it impossible to fully test this PR. It happens on both client/server cli binaries and can be seen if you view the logs while hitting the stop button in the GUI
|
Hey, can we get this merged? I'm stuck between a rock and hard place right now. I can't run the barrier GUI since flatpak doesn't support mdns and I can't run the client as a service because of this bug. I've temporarily fixed it by having it launch in a gui gnome-terminal session on startup, but I'd like to switch it over to a systemd service. I have windows, linux and osx vms that I could do some basic tests with need be. |
I'd say this couldn't be merged because of this segfault issue. |
Going to close this PR, if anyone wants to continue the work done here but figure out the segfaulting issue, feel free. I'd suggest opening a new PR though to run against our new CI. |
Little confused. You are closing the PR because of a segfault in barrier on OSX unrelated to the PR that makes it impossible to test the PR on OSX? |
I closed this PR mostly due to inactivity. I also will add, running against only the old CI doesn't make much sense. If we re-opened this as a new PR, it would be ran against the new CI. We would obviously reference this old closed PR in the new one so the convo isn't lost. |
@jwestfall69 /others who run Barrier on OSX who has this segfault issue: if you get a chance to get a core dump when it segfaults, please do -- that'd be superb for debugging. |
I created an issue with some details #389 |
new PR is #390 |
This PR re-implements how stdin reading is done on the cli and has the following fixes over the old
Fixes #200