Convert the calls to ps in swift-orphans to calls that will work on
Solaris.
--- swift-2.3.0/bin/swift-orphans.~1~ 2015-04-30 06:57:42.000000000 -0700
+++ swift-2.3.0/bin/swift-orphans 2016-02-08 00:54:16.772518488 -0800
@@ -54,12 +54,12 @@ Example (sends SIGTERM to all orphaned S
if name.endswith('.pid'):
pids.append(open(os.path.join(root, name)).read().strip())
- ['ps', '--ppid', pids[-1], '-o', 'pid', '--no-headers'],
+ ['/usr/bin/pgrep', '-P', pids[-1]],
stdout=subprocess.PIPE).communicate()[0].split())
listing = []
for line in subprocess.Popen(
- ['ps', '-eo', 'etime,pid,args', '--no-headers'],
+ ['/usr/bin/ps', '-eo', 'etime=', '-o' 'pid=', '-o' 'args='],
stdout=subprocess.PIPE).communicate()[0].split('\n'):
if not line:
continue
@@ -70,6 +70,7 @@ Example (sends SIGTERM to all orphaned S
sys.exit('Could not process ps line %r' % line)
if pid in pids:
continue
+ # XXX Do we get enough of the arguments to get "once"?
'swift-orphans' in args or \