Skip to content
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

Ctrl+c on terminal program mpsyt causes unclean termination #3100

Closed
D-Nice opened this issue Dec 27, 2019 · 6 comments
Closed

Ctrl+c on terminal program mpsyt causes unclean termination #3100

D-Nice opened this issue Dec 27, 2019 · 6 comments
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required

Comments

@D-Nice
Copy link

D-Nice commented Dec 27, 2019

The regular behaviour on ctrl+c for mpsyt is to gracefully shutdown, and also save whatever session history happened.

When running it in firejail, with or without profile, the exit is unclean. This always results in the session history not being saved, and there being no exit message as with vanilla mpsyt, but instead

Child received signal 2, shutting down the sandbox...

Parent is shutting down, bye...

Sometimes, the terminal it was run in, also ends up 'corrupted' in that it may no longer accept input.

I understand this is likely a symptom of the architecture. One way to get around it is to use the exit keyword, which will allow mpsyt to gracefully exit before the sandbox is terminated.

I thought it worth it to still ask if there is anyway around this, due to ctrl+c being in my muscle memory, and I presume this may affect other terminal applications that have ctrl+c handlers built-in, being skipped.

@glitsj16
Copy link
Collaborator

I stopped using mps-youtube for a while now, but if memory serves, it uses /q or /quit to exit gracefully. Being terminal based you might try with --ignore="shell none" --ignore=private-bin (or adding ignore shell none and ignore private-bin to your mpsyt.local).

@D-Nice
Copy link
Author

D-Nice commented Jan 21, 2020

@glitsj16 already aware of /exit, but /q and /quit are useful to know as well :).

Unfortunately the ignores did not help (put in local conf as mentioned, and I already have an existingo one for mpsyt), otherwise I would close the issue and consider it resolved.

It's not a breaking issue for me at all, but definitely could be an annoyance for certain things, and a known workaround would be useful for this and for other things. Most annoying part really is the unusable shell thereafter.

@glitsj16
Copy link
Collaborator

@D-Nice I can see why it is annoying to end up with a broken shell. The only other suggestion I have on this is to ignore tracelog and adding quiet at the top of the mpsyt.profile. But you might have tried that already. Wen I used mpsyt I had a script that started it in a dedicated terminal that I never used for anything else and I stopped firejailing mpsyt itself, only the custom defined player. Not nice but that at least kept things from breaking on shutting down mpsyt. I'm still clueless as to why this happens in the first place though.

@matu3ba
Copy link
Contributor

matu3ba commented Apr 10, 2020

@D-Nice The roughly handling is described here.
You could start with strace to see what stuff happens.
My guess is that the history is not written, but buffered in memory or tmpfiles. That is however the problem of the application.
This post describes the underlying problem in usage of bad specifications/designs.

@glitsj16 Suggestion to tag more information needed.

@glitsj16 glitsj16 added the information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required label Apr 10, 2020
@glitsj16
Copy link
Collaborator

@matu3ba Done. I had some email trouble lately and I think I saw another thread you asked me to label. Do you happen to remember which one?

@rusty-snake
Copy link
Collaborator

I'm closing here due to inactivity, please fell free to reopen if you still have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required
Projects
None yet
Development

No branches or pull requests

4 participants