Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

kill -SIGTERM PID #177

Closed
zanderisrael opened this Issue · 3 comments

3 participants

@zanderisrael

From what i understand from this code :
rapns / lib / rapns / daemon.rb

#
def self.setup_signal_traps
@shutting_down = false

  Signal.trap('SIGHUP') { AppRunner.sync }
  Signal.trap('SIGUSR2') { AppRunner.debug }

  ['SIGINT', 'SIGTERM'].each do |signal|
    Signal.trap(signal) { handle_shutdown_signal }
  end
end

#
I can gracefully shutdown the daemon by calling this:

kill -SIGTERM pidof rapns

When i call it from root with ssh , it works , yet no shutdown message is shown.
When i call it from my rails controller:

system("kill -SIGTERM pidof rapns")

It has no effect.

i noticed that if the queue was empty and no sending happend the kill command worked from the rails controller...

Am i doing things wrong?

@mattconnolly

I believe the system command should be 'kill -TERM '

@zanderisrael

Still a no go :(, its not killing the daemon.

@ileitch
Owner

Did you manage to figure out what was wrong here?

@ileitch ileitch closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.