sub-emperor can be loyal

This commit is contained in:
Unbit
2014-01-19 08:27:05 +01:00
parent 6c9f73ae7f
commit 98e7e0845d
+10
View File
@@ -1534,6 +1534,16 @@ void emperor_loop() {
uwsgi_hooks_run(uwsgi.hook_emperor_start, "emperor-start", 1);
// signal parent-Emperor about my loyalty
if (uwsgi.has_emperor && !uwsgi.loyal) {
uwsgi_log("announcing my loyalty to the Emperor...\n");
char byte = 17;
if (write(uwsgi.emperor_fd, &byte, 1) != 1) {
uwsgi_error("write()");
}
uwsgi.loyal = 1;
}
for (;;) {
if (on_royal_death) {