#!/usr/bin/python """ Search for and kill app. """ import os, sys import commands import signal def main(): if len(sys.argv) != 2: print 'Missing or too many arguments.' print 'One argument and only one argument is required.' print 'Pass in the app name to find and kill (i.e. "Safari").' return 0 psCmd = '/bin/ps -x -c | grep ' + sys.argv st, output = commands.getstatusoutput( psCmd ) if st == 0: appsToKill = output.split('\n') for app in appsToKill: parts = app.split() killCmd = 'kill -s 15 ' + parts #print killCmd os.system( killCmd ) if __name__ == "__main__": main()
(You can download the Acrobat 9.1.3 update and find this script at
Acrobat 9 Pro Patch.app/Contents/Resources/FindAndKill.py.)
Was the author not aware of the
killall command for sending a kill signal to a named process? The
killall man page says it appeared in FreeBSD 2.1, which was released in November 1995. Adobe CS4 was released about 14 years later. How is it Adobe’s product managers approve these things for release?
What is particularly galling about Adobe’s Acrobat 9 updaters is that they seem to re-implement so much of what the Apple installer application does, even down to their use of gzipped cpio archives for the payload.