Comments (14)
This works for me and is implemented: https://github.com/Hjdskes/cage/blob/master/cage.c#L92.
Sometimes there's a delay, but I suppose that is the application within Cage shutting down (or crashing), since the display terminates. We should probably properly shut down the applications within Cage, if this is possible. What application are you noticing this with?
from cage.
firefox-wayland. I gave it about 10 seconds or so but it seems to ignore my requests.
from cage.
static int
handle_signal(int signal, void *data)
{
struct wl_display *display = data;
switch (signal) {
case SIGINT:
/* Fallthrough */
case SIGTERM:
wl_display_terminate(display);
+ exit(0);
- return 0;
default:
return 1;
}
}
This fixes it for me, but I suppose the int returned from this function is supposed to be used by Wayland as an exit code anyway, right?
from cage.
This also makes Firefox close instantly for me:
diff --git a/cage.c b/cage.c
index 7f5b6f4..cf8c71f 100644
--- a/cage.c
+++ b/cage.c
@@ -48,6 +48,9 @@ spawn_primary_client(char *argv[], pid_t *pid_out)
{
pid_t pid = fork();
if (pid == 0) {
+ sigset_t set;
+ sigemptyset(&set);
+ sigprocmask(SIG_SETMASK, &set, NULL);
execvp(argv[0], argv);
_exit(1);
} else if (pid == -1) {
However, Cage does segfault on close now. Still looking into that, but it'd be great if you could test the above.
from cage.
However, Cage does segfault on close now.
Scratch that, it did that before. If the above works for you, I'll get that in and open a new issue for the segfault.
from cage.
The patch works 👍. As you say, there is a segfault on close, but it isn't critical.
from cage.
Great! I'll push the fix tomorrow.
from cage.
I've just noticed this is still happening if an application isn't passed. Same unresponsiveness to SIGTERM.
from cage.
Can you elaborate? What do you mean when you say "an application isn't passed?"
When I launch Cage with Termite and from Termite launch Epiphany, then CTRL-C Cage, everything closes immediately.
from cage.
master
currently isn't building with the latest version of wlroots so I can't retest. I mean just running cage
with no parameters.
from cage.
For what it's worth, personally I keep wlroots at 0.3 and develop against that. It's enough work to develop Cage that I'm not wanting to constantly keep up with every breaking change in wlroots :)
from cage.
Hm.. you're not supposed to be able to run cage
without any application to start. I'll look into that.
from cage.
I personally prefer sticking to tagged releases of wlroots, but most projects don't seem to do that. I've built master now and it is still an issue.
from cage.
This is fixed in 848929c.
from cage.
Related Issues (20)
- Crash on drag HOT 3
- feature: ability to change keyboard layout while running HOT 4
- Firefox/chrome kiosk allows restricted keyboard shortcuts HOT 4
- cage crashes with -r rotate the output 90 degrees clockwise HOT 6
- Failed to enable unit: Cannot alias [email protected] as display-manager.service HOT 6
- Does Cage not work with Tauri apps? HOT 3
- Matching touch input to rotated screen - how to find my output device name HOT 2
- DRM panel orientation not taken into account HOT 3
- Screen sharing via apps like TeamViewer and AnyDesk, is unattended mode possible in Wayland? HOT 4
- Support wlr-layer-shell as a Backend HOT 1
- Build Fails on wlroots 0.17.2-1 HOT 6
- Cage doesn't seem to auto-activate the client until the first input HOT 5
- Persisting Data HOT 3
- Unable to create wlroots backend HOT 6
- Add an IRC channel for communication
- Cannot launch in X11 session HOT 5
- XDG_RUNTIME_DIR is not set in the environment HOT 6
- Release new version
- [QUESTION] Running a second app? HOT 2
- Segfault on SIGTERM leaving the display hanging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cage.