ifrit icon indicating copy to clipboard operation
ifrit copied to clipboard

os.Signal interface applicability unclear on Windows

Open charles-dyfis-net opened this issue 2 years ago • 1 comments

The design of Ifrit makes a great deal of sense for the general case of folks on POSIX-y operating systems.

On Windows, however, os.Signal is not so much a thing -- os.Interrupt exists, but as far as I can tell it's specific to applications running in a terminal session.

Perhaps a future version of the API should have more flexibility in the channel used to trigger graceful shutdown?

charles-dyfis-net avatar Jan 16 '23 17:01 charles-dyfis-net

Yes it is very POSIX-y, but ifrit's use of signals is independent from the underlying signals used by the operating system. Conceptually, the purpose is to allow users the ability to differentiate between requests for a clean (blocking) shutdown and a faster non-blocking shutdown. You can tie these options into whatever control system you are using.

tedsuo avatar Mar 30 '23 19:03 tedsuo