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

Signals trapping isn't working on Windows #59

Closed
thibaudgg opened this issue May 6, 2011 · 3 comments
Closed

Signals trapping isn't working on Windows #59

thibaudgg opened this issue May 6, 2011 · 3 comments
Labels

Comments

@thibaudgg
Copy link
Member

As discussed here and here

@ttilley
Copy link
Member

ttilley commented May 7, 2011

you mean to tell me that a specification for interoperability between unix derived operating systems isn't being adhered to by an operating system with a history almost entirely disconnected from unix? Yeah, no, that sounds about right. ;)

Posix Signals aren't generally available under windows as far as I know. There does exist an officially supported subsystem with a varied subset of POSIX APIs, but apparently only if you purchase the enterprise or ultimate versions of vista/win7. This includes the ability to write software that supports POSIX signals (but not automatic support of them). Hell, the enterprise windows unix... thing... even has an old and seemingly unmaintained port of debian that targets it. How's that for terrifying?

Anyways, jumping back to ruby. The initial port was done using cygwin. Cygwin's an absolutely massive POSIX and general UNIX compatibility layer that sacrifices performance, runtime size, and functionality as the cost of compatibility. It does, however, provide an absolute wealth of unix comfort in otherwise hostile territory. It wouldn't surprise me in the least if signal trapping worked just fine in windows as long as you made use of a cygwin-based ruby.

The original windows one-click installer made use of visual studio 6, which is dinosaur ancient. The current windows one-click installer makes use of mingw and msys. Neither would support posix signals but I don't know too much more than that. I took one look, saw a "gcc.bat" and "make.bat", and became very sad.

As an aside, ISO C99 does define a small number of non-posix signals that implementors are required to support, but the only two that are catchable via an exit handler are SIGINT and SIGTERM (at least according to spec, and we all know how much microsoft loves conforming to standards).

@ttilley
Copy link
Member

ttilley commented May 7, 2011

LOL, here's a full list of supported signals and documented best practices for working around the rest. Have fun! ^_^;

@thibaudgg
Copy link
Member Author

Thanks for your research, I think we'll need to found a workaround and skip Signals on windows :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants