Commit 304d80b2 authored by David Johnson's avatar David Johnson

Launch wfagents with correct arg ordering (for extra args).

(Interface name is always argv[1]; extras are argv[2:], if any.)
parent 13adfaf4
Pipeline #1910 passed with stage
in 2 seconds
...@@ -32,8 +32,12 @@ def main(): ...@@ -32,8 +32,12 @@ def main():
pidfile = sys.argv[1] pidfile = sys.argv[1]
logfile = sys.argv[2] logfile = sys.argv[2]
iface = sys.argv[3] iface = sys.argv[3]
args = sys.argv[4:] prog = sys.argv[4]
args.append(iface) args = [prog,iface]
if len(sys.argv) > 5:
for a in sys.argv[5:]:
args.append(a)
pass
pf = file(pidfile,'w') pf = file(pidfile,'w')
lf = file(logfile,'a') lf = file(logfile,'a')
...@@ -61,7 +65,7 @@ def main(): ...@@ -61,7 +65,7 @@ def main():
else: else:
print "DEBUG: running %s" % (str(args)) print "DEBUG: running %s" % (str(args))
pass pass
os.execve(sys.argv[4],args,newenviron) os.execve(prog,args,newenviron)
return -1 return -1
else: else:
return 0 return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment