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

Listen leaves rb-fsevent running in the background when KILL sent via guard #91

Closed
parkr opened this issue Mar 25, 2013 · 21 comments
Closed
Milestone

Comments

@parkr
Copy link

parkr commented Mar 25, 2013

We were just having a chat at imathis/octopress#1119 and it appears that Listen is not terminating the rb-fsevent process when we terminate guard via Process.kill(9, guardPid). Is this a known issue?

When sending QUIT (via Process.kill(3, guardPid)) it terminated properly.

  • Guard 1.6.2
  • Listen >= 0.6.0
@thibaudgg
Copy link
Member

Hi @parkr,

Listen uses Thread.kill to terminate adapter (rb-fsevent) so I'm not sure how to send QUIT with that. Maybe it should be fixed on the Guard side? @guard/core-team WDYT?

@parkr
Copy link
Author

parkr commented Mar 26, 2013

What triggers the Thread.kill? If a ruby thread with Listen.to is killed, does Listen catch the KILL signal (SIGINT) and execute Thread.kill on the adapter?

@rymai
Copy link
Member

rymai commented Mar 26, 2013

Hi,

The KILL signal cannot be trapped so you shouldn't use it to stop Guard (or maybe by negating the Guard pid which causes all processes in process group to receive the signal). That said, Guard handles the INT signal (Ctrl-C) properly so the solution of sending a INT signal in Octopress preview rake task is indeed the right one IMO.

The issue encountered in imathis/octopress#1119 might be something like the one described in StackOverflow, though.

I'd be curious to have @sursh's opinion about this (I've read your latest article, cool stuff)!

@envygeeks
Copy link
Contributor

@rymai The kill signal can be trapped in Ruby.

@rymai
Copy link
Member

rymai commented Jul 3, 2013

@envygeeks I was speaking of the SIGKILL signal which cannot be trapped:

SIGKILL
The SIGKILL signal is sent to a process to cause it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored, and the receiving process cannot perform any clean-up upon receiving this signal.

Source: https://en.wikipedia.org/wiki/Unix_signal#POSIX_signals

@thibaudgg
Copy link
Member

Duplication of #105

@envygeeks
Copy link
Contributor

How can an older ticket be a duplicate of a newer ticket? Unless it went through time and space and jumped back.

@netzpirat
Copy link
Contributor

From the Oxford dictionary for duplicate:

one of two or more identical things

So the word duplicate has no time component and there's no restriction that an older thing cannot be a duplicate of a newer thing. There's not a single, right way how to handle an open source project and it's the maintainers sole decision which issue he want to close in favor of another.

@envygeeks
Copy link
Contributor

Not even worth it... you can't win with illogical people.

@thibaudgg
Copy link
Member

@envygeeks for me #105 title is more accurate about what is the main problem (the lack of signal handler), but both issues are still valid and need to be fixed. Too bad you take it like that, it wasn't my attention.

@envygeeks
Copy link
Contributor

I wasn't questioning if you were right, you are right about what you said a few seconds ago... I was questioning the statement that implies that 105 can be a duplicate of 91. The argument that duplication doesn't involve time is entirely wrong but we won't argue those facts here because they are irrelevant and more off topic than I already pushed this thread to... and... to argue it doesn't involve time is to argue that time is irrelevant. Either way by my questioning I was asking for a better description which your provided.

@thibaudgg
Copy link
Member

Ok I understand, as you know english isn't my first language.
What would have been the correct text to close that issue? (So I could be right the next time). Thanks.

@envygeeks
Copy link
Contributor

I would have loved to of seen a full description of why the other ticket is more favored tbh.

@thibaudgg
Copy link
Member

It was firstly because of the more descriptive title, secondly the fact that Signal Handling will be certainly added to Celluloid and that discussion occur in #105 . I'll be clearer next time, thanks for your explanation.

@netzpirat
Copy link
Contributor

@envygeeks I still believe my statement is true: If you include time in the comparison, they cannot be duplicates, because they differ in (creation) time. For me duplicate refers to the content and not the time, but no need to discuss that further in detail from my side. I can understand your view, but I do not appreciate that you call me a smart ass, a troll and an illogical person not worth discussing with, just because I have a different opinion than you. Deleting your message afterwards doesn't make it unhappen. I always try to be polite, respectful, tolerant and constructive, help people solve issues and contribute to OSS software as much as I can. I do not understand why this is a reason to use such an abusive language, slam me down and attack me personally out of the blue in such a bad way.

@envygeeks
Copy link
Contributor

By your logic they can be duplicates without one existing to act as the master template in the past... or worse, that the duplicate can act as the master template in the future to the past... Time matters a lot to duplication and what you are describing is a bootstrap paradox or a form of it.

Calling somebody illogical is not an insult and if you take it as so then so be it. I did not call you stupid, I did not call you ignorant... those are insults. I do not care if you work on OSS software as that has nothing to do with what I pointed out and bringing up that argument gives you no favor with me since I do donate to OpenSource software too, I also was not abusive but I'll let you consider it that because of course people will cry about anything now days.

@netzpirat
Copy link
Contributor

And why did you delete your comment?

@envygeeks
Copy link
Contributor

I said when I deleted my argument, it was not worth it, but you decided to continue on so I pointed out your lack of logic and lack of noticing the implications of my initial statement: #91 cannot be a duplicate of #105 because #91 has to exist (time wise) before #105 in order for either one of them to be a duplicate or you have a paradox on your hands, the very paradox you are implying by keeping time out of the equation not realizing that time matters to everything.

@netzpirat
Copy link
Contributor

You're absolutely right if you talk about exact duplicates, the original needs to exists before the copy. But we're not talking about exact duplicates, since the issues were reported by different people, at a different times, with a different title and different comment, have different comments from different users at different times, so they are duplicate only in their meaning and in contrast to an exact duplicate, this doesn't imply that one cannot exists without the other. You're also right that it's not worth it, I'm off this discussion and leave you the last word...

@envygeeks
Copy link
Contributor

Your logic is still flawed... there can be no such thing as an exact duplicate as all duplicates will have flaws. With that said, time is attached, it is for lack of a better example part of the meta-data and can be changed because creation time must be altered for the duplicate to happen. In information theory this would be moved to "original creation time" and "creation time" being changed to the creation time of the duplicate.

The rest of your argument, where you suddenly changed the meaning of duplicate to suite your needs implies you are playing the straw man, actually it doesn't imply it, it sort of shows that you are in-fact a straw man. For any duplicate to exist the information must have existed before or this will be a paradox, whether partial or fully the original information must exist. There is no way around that unless you want to start addressing a possible paradox.

@envygeeks
Copy link
Contributor

I updated my statement and removed "if you do not want it" as I did not mean to put that.

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

No branches or pull requests

5 participants