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

SIGINT not passed to application #1032

Open
1 task done
JakeCooper opened this issue Dec 16, 2023 · 5 comments
Open
1 task done

SIGINT not passed to application #1032

JakeCooper opened this issue Dec 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@JakeCooper
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

SIGINT does not pass to container

To reproduce

Build the following

import { setTimeout } from "timers/promises";

const b = async () => {
	console.log("IN");
	process.on("SIGINT", () => {
		console.log("[ ⚡️ ] SIGINT received, shutting down");
	});

	process.on("SIGTERM", () => {
		console.log("[ ⚡️ ] SIGTERM received, shutting down");
	});

	process.on("uncaughtException", (err) => {
		console.log("[ ⚡️ ] Uncaught exception", err);
	});
	
	console.log("Loop init'd. Waiting...");
	await setTimeout(5000000);
}

b()

Run it

Try to SIGINT it

Expected behavior

SIGINT is processed

Environment

All environments

@JakeCooper JakeCooper added the bug Something isn't working label Dec 16, 2023
@JakeCooper
Copy link
Contributor Author

@JakeCooper JakeCooper changed the title Nixpacks Bug Report SIGINT not passed to application Dec 16, 2023
@dush-t
Copy link

dush-t commented Dec 19, 2023

Is this issue still up? Would like to attempt a fix.

@coffee-cup
Copy link
Contributor

Is this issue still up? Would like to attempt a fix.

Yes this is still an issue. Would love a PR to fix it

@dush-t
Copy link

dush-t commented Jan 12, 2024

Alright, I'll attempt one.

@dush-t
Copy link

dush-t commented Jan 15, 2024

Unable to reproduce this. The SIGINT signal is, in fact, passed to the container upon running the example provided by @JakeCooper in the issue description.

I'm using Docker v4.26.1 on MacOS Monterey on an ARM macbook.
Could you provide a more definitive way to reproduce this? What platform are you testing on, and what docker version are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants