1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: Preserve process name on reload
Function uwsgi_reload is using uwsgi.binary_path as first argument in
execvp(). If the daemon is started through a symlink, uwsgi_reload will
use that link's target and change the process name. With a different process
name start-stop-daemon, used in init scripts, is unable to control the
daemon.
Author: Janos Guljas <janos@debian.org>
Forwarded: not-needed
Last-Update: 2013-04-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/core/master_utils.c
+++ b/core/master_utils.c
@@ -537,7 +537,7 @@
uwsgi_log("running %s\n", uwsgi.binary_path);
uwsgi_flush_logs();
- argv[0] = uwsgi.binary_path;
+ //argv[0] = uwsgi.binary_path;
//strcpy (argv[0], uwsgi.binary_path);
if (uwsgi.log_master) {
if (uwsgi.original_log_fd > -1) {
@@ -551,7 +551,7 @@
close(uwsgi.shared->worker_log_pipe[1]);
}
}
- execvp(uwsgi.binary_path, argv);
+ execvp(argv[0], argv);
uwsgi_error("execvp()");
// never here
exit(1);
|