Patches: Browse | Submit New | Admin

[#29450] Always handle INT signal

Date:
2011-12-02 15:10
Priority:
3
Submitted By:
Vít Ondruch (voxik)
Assigned To:
Thomas Uehlinger (uehli)
Category:
None
State:
Open
Summary:
Always handle INT signal

Detailed description
Hello,

Recently, I was trying to make Thin's test suite working with RSpec 2 and Thin is using daemons. The problem is, that
the RSpec 2 are handling the INT signal, therefore this signal is not propagated to the daemons, so Thins process never
ends and therefore its test suite fails.

The attached patch enforces the handling of INT signal in you gem, so even if RSpec handles the signal, it is also handled
properly by your daemon and the test suite passes. Nevertheless, I am aware that this is a bit tricky situation and
I am not 100% sure this should be fixed in daemons or RSpec, so I am going to open also similar ticket for RSpec.

Vit

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-12-04 13:30
Sender: Vít Ondruch

Yes, I totally understand and agree to wait, since this
patch might have another unforeseeable implications, e.g. it
is nowhere written that the daemon should end after single
INT signal is received. May be the Thin should be the one
who will handle the signal preferably. May be I should
contact also Thin authors. Anyway, I'll keep you informed.
Thank you.
Date: 2011-12-04 13:19
Sender: Thomas Uehlinger

Vit,

I quickly thought about the implications for you patch and I
cannot immediately see that this would break other apps relying
on daemons. Nevertheless, I would like to wait for the outcome
of the discussions on github concerning rspec before releasing
a new version. I would be happy to get a quick e-mail from you
as sons as you feel that there is conclusion from the rspec side.
Date: 2011-12-02 22:01
Sender: Vít Ondruch

Interesting, I am pretty sure that I browsed for the patch.
I am attaching it now ...
Date: 2011-12-02 21:50
Sender: Thomas Uehlinger

Dear Vit,

I'm happy to have a look at this situation but I think you forgot
to attach your patch.

-- Thomas
Date: 2011-12-02 15:22
Sender: Vít Ondruch

RSpec issue: https://github.com/rspec/rspec-core/issues/520

Attached Files:

Name Description Download
always-handle-INT.patch Download

Changes:

Field Old Value Date By
File Added5441: always-handle-INT.patch2011-12-02 22:01voxik
assigned_tonone2011-12-02 21:50uehli