File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,21 @@ pub fn main() !void {
4141 if (gpa .detectLeaks ()) std .posix .exit (1 );
4242 };
4343
44+ // Exit the program on SIGINT signal. When running the browser in a Docker
45+ // container, sending a CTRL-C (SIGINT) signal is catched but doesn't exit
46+ // the program. Here we force exiting on SIGINT.
47+ std .posix .sigaction (std .posix .SIG .INT , & std.posix.Sigaction {
48+ .handler = .{
49+ .handler = struct {
50+ pub fn handler (_ : c_int ) callconv (.C ) void {
51+ std .posix .exit (0 );
52+ }
53+ }.handler ,
54+ },
55+ .mask = std .posix .empty_sigset ,
56+ .flags = 0 ,
57+ }, null );
58+
4459 run (alloc ) catch | err | {
4560 // If explicit filters were set, they won't be valid anymore because
4661 // the args_arena is gone. We need to set it to something that's not
You can’t perform that action at this time.
0 commit comments