This is an automated email from the ASF dual-hosted git repository. ankit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new c8c3136 PHOENIX-5594 Different permission of phoenix-*-queryserver.log from umask (Toshihiro Suzuki) c8c3136 is described below commit c8c31365fa67b7deb293b526ef0c96a7e878adbd Author: Toshihiro Suzuki <brfrn...@gmail.com> AuthorDate: Fri Nov 29 22:05:04 2019 +0900 PHOENIX-5594 Different permission of phoenix-*-queryserver.log from umask (Toshihiro Suzuki) --- bin/queryserver.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/queryserver.py b/bin/queryserver.py index 0c07b3b..26d096c 100755 --- a/bin/queryserver.py +++ b/bin/queryserver.py @@ -148,6 +148,10 @@ if command == 'start': print >> sys.stderr, "daemon mode not supported on this platform" sys.exit(-1) + # get the current umask for the sub process + current_umask = os.umask(0) + os.umask(current_umask) + # run in the background d = os.path.dirname(out_file_path) if not os.path.exists(d): @@ -171,8 +175,12 @@ 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()) + child = subprocess.Popen(cmd.split(), preexec_fn=initsubproc) sys.exit(child.wait()) elif command == 'stop':