unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "pudiva chip líquida" <pudiva@skylittlesystem.org>
To: unicorn-public@yhbt.net
Subject: at_exit ignored on worker processes
Date: Mon, 11 Apr 2022 20:02:38 +0100	[thread overview]
Message-ID: <CAHpAuDGRjr8XmfUcmu+qjSQ+_9wbRykYLDtUMM6sMosfUNg-Ng@mail.gmail.com> (raw)

Dear unicorns,

I was trying to register some code with `at_exit`, so that it would
execute when my app processes terminated, but I found out that it was
being run only for the main unicorn process, not the workers, as those
are terminated with `exit!` (note the !):

https://yhbt.net/unicorn.git/tree/lib/unicorn/http_server.rb?h=v6.0.0#n675

Would you mind me asking why you decided to go with `exit!` instead of
plain `exit`, and what would be the correct way of executing code on
worker termination?

Thank you!
Best regards,

-- 
pudiva chip líquida

             reply	other threads:[~2022-04-11 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 19:02 pudiva chip líquida [this message]
2022-04-11 20:42 ` at_exit ignored on worker processes Eric Wong
2022-04-12  0:27   ` pudiva chip líquida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHpAuDGRjr8XmfUcmu+qjSQ+_9wbRykYLDtUMM6sMosfUNg-Ng@mail.gmail.com \
    --to=pudiva@skylittlesystem.org \
    --cc=unicorn-public@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).