You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or intended behavior, but, unlike as for workers, atexit() hook is not called when mule is terminated, though postfork() is called as usual (tested on 2.0.11.1)
The text was updated successfully, but these errors were encountered:
Config is as simple as it can be: uwsgi --http-socket :9090 -L -M --mule --psgi uwsgi-dummy.pl
But after some investigation, it seems that I found how (but not why) this happens - I have $SIG{INT} handler set in postfork(), which prevents execution of atexit() in mule (though it does not prevent atexit() in worker).
What is a bit puzzling, though, is that this sigint handler is not called at all (but I can live with that). My sample code:
use strict;
use warnings;
uwsgi::log("[$$] Initializing\n");
uwsgi::postfork(sub {
uwsgi::log("[$$]: postfork()\n");
$SIG{INT} = sub {
uwsgi::log("[$$] SIGINT received\n");
};
});
uwsgi::atexit(sub {
uwsgi::log("[$$]: atexit()\n");
});
my$app = sub {
return [200, [ "Content-Type"=>'text/plain' ], ["There is nothing to see here, sorry\n"]];
};
And the output when killing:
...
[5298] Initializing
PSGI app 0 (uwsgi-d.pl) loaded in 0 seconds at 0x1804ab0 (interpreter 0x15ca5d0)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 5298)
spawned uWSGI worker 1 (pid: 5299, cores: 1)
[5299]: postfork()
spawned uWSGI mule 1 (pid: 5300)
[5300]: postfork()
^CSIGINT/SIGQUIT received...killing workers...
[5299]: atexit()
worker 1 buried after 1 seconds
goodbye to uWSGI.
No output from signal handler and from atexit() in mule. Tried this on CentOS 6 (perl 5.8) and CentOS 7 (perl 5.16), uwsgi 2.0.11.1 - same result.
Hi,
Not sure if this is a bug or intended behavior, but, unlike as for workers, atexit() hook is not called when mule is terminated, though postfork() is called as usual (tested on 2.0.11.1)
The text was updated successfully, but these errors were encountered: