JRuby

Signal#trap doesn't handle failure of trapping gracefully.

Details

  • Number of attachments :
    0

Description

So, on Windows 2003 Server, trying to run trap("TERM") will cause a lovely IllegalArgumentException, since the JVM on Win32 already uses SIGTERM. This actually makes Rails break totally, since Rails transaction implementation uses TERM for each transaction. Kaboom.

The good answer here is to rescue all exceptions and print a generic warning that that signal isn't supported on the platform. This allows other signals to work, and isn't worse than not having signals. (Remember, we're using Sun's internal Signal implementation - not really supported).

Issue Links

Activity

Hide
Ola Bini added a comment -

Fixed.

Show
Ola Bini added a comment - Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: