This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git
The following commit(s) were added to refs/heads/master by this push: new b593892 PHOENIX-6654 queryserver.py sets the umask to 0000 when starting PQS in daemon mode b593892 is described below commit b59389266a4566ac2c35f9d2be5036911c342da9 Author: Istvan Toth <st...@cloudera.com> AuthorDate: Wed Mar 2 11:18:35 2022 +0100 PHOENIX-6654 queryserver.py sets the umask to 0000 when starting PQS in daemon mode --- bin/queryserver.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/queryserver.py b/bin/queryserver.py index 19e0109..be17098 100755 --- a/bin/queryserver.py +++ b/bin/queryserver.py @@ -162,6 +162,7 @@ if command == 'start': pidfile = daemon.PidFile(pid_file_path, 'Query Server already running, PID file found: %s' % pid_file_path), stdout = out, stderr = out, + umask = current_umask ) print('starting Query Server, logging to %s' % log_file_path) with context: @@ -176,12 +177,8 @@ if command == 'start': sys.exit(0) signal.signal(signal.SIGTERM, handler) - def initsubproc(): - # set the parent's umask - os.umask(current_umask) - print('%s launching %s' % (datetime.datetime.now(), cmd)) - child = subprocess.Popen(cmd.split(), preexec_fn=initsubproc) + child = subprocess.Popen(cmd.split()) sys.exit(child.wait()) elif command == 'stop': @@ -207,7 +204,7 @@ elif command == 'stop': print("stopping Query Server pid %s" % pid) with open(out_file_path, 'a+') as out: - sys.stderr.write("daemon mode not supported on this platform{}".format(os.linesep)) + sys.stderr.write("sending SIGTERM{}".format(os.linesep)) os.kill(pid, signal.SIGTERM) else: