diff options
Diffstat (limited to 'python/skytools/scripting.py')
-rw-r--r-- | python/skytools/scripting.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py index c7791dbc..61b4aa6a 100644 --- a/python/skytools/scripting.py +++ b/python/skytools/scripting.py @@ -72,10 +72,9 @@ def run_single_process(runnable, daemon, pidfile): try: if pidfile: - f = open(pidfile, 'w') + data = str(os.getpid()) + skytools.write_atomic(pidfile, data) own_pidfile = True - f.write(str(os.getpid())) - f.close() runnable.run() finally: |