Skip to content
Snippets Groups Projects
Commit e9dd37c9 authored by Papeleux Luc's avatar Papeleux Luc
Browse files

add comment to explain the use of setsid

parent 9013bd55
No related branches found
No related tags found
No related merge requests found
...@@ -294,7 +294,7 @@ class ParametricJob(PRMSet): ...@@ -294,7 +294,7 @@ class ParametricJob(PRMSet):
#file.write("echo \"at JobId = $jobId\"\n") #file.write("echo \"at JobId = $jobId\"\n")
#file.write('%s -x -i $jobId -d "%s"\n' % (sys.argv[0], os.getcwd()) ) #file.write('%s -x -i $jobId -d "%s"\n' % (sys.argv[0], os.getcwd()) )
script = re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0]) #if launched through a Gui => use the basic script instead in batch script = re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0]) #if launched through a Gui => use the basic script instead in batch
file.write('setsid %s -x -i %d -d "%s"\n' % (script, launchId, os.getcwd()) ) file.write('setsid %s -x -i %d -d "%s"\n' % (script, launchId, os.getcwd()) ) # setsid added to generate a new process group (used to easily kill process tree), else the process group is the same as atd daemon (=> killScript kill all at process running)
file.close() file.close()
os.chmod(scriptname,0o700) os.chmod(scriptname,0o700)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment