Use exec instead of forked child process for JVM
Use exec instead of forked child process for JVM

Using os.system() for creating the JVM forks a child of the Python
process. This makes it difficult for process managers like daemontools
or runit to kill/restart the process at admins' command: the process
manager tracks the PID of the Python process instead of that of the JVM;
and terminating the Python process unfortunately doesn't kill its JVM
child.

Some process managers let you configure the number of times the service
forks, or try to detect forks, but it's a bit of a rabbit-hole. Better
to make the service not fork in the first place.

For that reason I've replaced the call to os.system() with os.execvp(),
which replaces the Python process with the JVM, and thus lets the
process manager track the right PID.

os.execvp() requires that you give command-line arguments as an array of
strings, rather than one long whitespace-separated string, so I had to
change some of the surrounding code accordingly. Note this has the
pleasant side-effect that Storm should now also run if you install it in
a directory that has spaces in its path name.

nathanmarz/storm,kishorvpatil/incubator-storm,elancom/storm,pczb/storm,carl34/storm,raviperi/storm,Crim/storm,kamleshbhatt/storm,rahulkavale/storm,cluo512/storm,kevinconaway/storm,kevinconaway/storm,hmcl/storm-apache,kamleshbhatt/storm,srdo/storm,kishorvpatil/incubator-storm,knusbaum/incubator-storm,lcp0578/storm,kamleshbhatt/storm,praisondani/storm,revans2/storm,pczb/storm,roshannaik/storm,Crim/storm,ujfjhz/storm,hmcc/storm,gongsm/storm,F30/storm,kevpeek/storm,cluo512/storm,kishorvpatil/incubator-storm,cluo512/storm,carl34/storm,jamesmarva/storm,kamleshbhatt/storm,ferrero-zhang/storm,roshannaik/storm,ferrero-zhang/storm,kamleshbhatt/storm,d2r/storm-marz,0x726d77/storm,ujfjhz/storm,gongsm/storm,Frostman/storm,metamx/incubator-storm,revans2/incubator-storm,allenjin/storm,roshannaik/storm,kevpeek/storm,kevpeek/storm,jamesmarva/storm,taoguan/storm-1,Crim/storm,revans2/incubator-storm,Frostman/storm,0x726d77/storm,ferrero-zhang/storm,chrismoulton/storm,0x726d77/storm,knusbaum/incubator-storm,konfer/storm,knusbaum/incubator-storm,F30/storm,pczb/storm,hilfialkaff/storm,0x726d77/storm,hmcc/storm,rahulkavale/storm,knusbaum/incubator-storm,mesosphere/storm,srishtyagrawal/storm,3manuek/storm-1,adityasharad/storm,Aloomaio/incubator-storm,erikdw/storm,sakanaou/storm,hmcc/storm,kevpeek/storm,F30/storm,d2r/storm-marz,adityasharad/storm,praisondani/storm,adityasharad/storm,chrismoulton/storm,d2r/storm-marz,ujfjhz/storm,hilfialkaff/storm,sakanaou/storm,adityasharad/storm,metamx/incubator-storm,kishorvpatil/incubator-storm,jamesmarva/storm,srdo/storm,hilfialkaff/storm,Aloomaio/incubator-storm,srdo/storm,ujfjhz/storm,Frostman/storm,pczb/storm,cherryleer/storm,hmcl/storm-apache,ujfjhz/storm,Crim/storm,sakanaou/storm,srdo/storm,taoguan/storm-1,0x726d77/storm,elancom/storm,cherryleer/storm,mesosphere/storm,revans2/storm,pczb/storm,revans2/incubator-storm,lcp0578/storm,konfer/storm,chrismoulton/storm,srishtyagrawal/storm,d2r/storm-marz,lcp0578/storm,metamx/incubator-storm,praisondani/storm,kevpeek/storm,Frostman/storm,knusbaum/incubator-storm,kamleshbhatt/storm,sakanaou/storm,srishtyagrawal/storm,revans2/incubator-storm,kevinconaway/storm,jamesmarva/storm,srdo/storm,kevinconaway/storm,srdo/storm,mesosphere/storm,erikdw/storm,Crim/storm,Crim/storm,pczb/storm,ferrero-zhang/storm,hmcc/storm,rahulkavale/storm,rahulkavale/storm,erikdw/storm,0x726d77/storm,roshannaik/storm,elancom/storm,jamesmarva/storm,roshannaik/storm,allenjin/storm,raviperi/storm,hmcl/storm-apache,adityasharad/storm,cluo512/storm,hilfialkaff/storm,carl34/storm,lcp0578/storm,srishtyagrawal/storm,konfer/storm,kevpeek/storm,raviperi/storm,F30/storm,kevinconaway/storm,kevinconaway/storm,elancom/storm,raviperi/storm,Aloomaio/incubator-storm,Frostman/storm,revans2/storm,gongsm/storm,mesosphere/storm,nathanmarz/storm,hilfialkaff/storm,kamleshbhatt/storm,lcp0578/storm,3manuek/storm-1,cherryleer/storm,ujfjhz/storm,hmcl/storm-apache,kevpeek/storm,cherryleer/storm,taoguan/storm-1,sakanaou/storm,carl34/storm,konfer/storm,srishtyagrawal/storm,chrismoulton/storm,konfer/storm,carl34/storm,Aloomaio/incubator-storm,revans2/storm,praisondani/storm,allenjin/storm,Aloomaio/incubator-storm,gongsm/storm,hmcl/storm-apache,hmcl/storm-apache,sakanaou/storm,kevinconaway/storm,kishorvpatil/incubator-storm,roshannaik/storm,kishorvpatil/incubator-storm,srdo/storm,taoguan/storm-1,nathanmarz/storm,Aloomaio/incubator-storm,carl34/storm,erikdw/storm,mesosphere/storm,roshannaik/storm,cherryleer/storm,gongsm/storm,metamx/incubator-storm,cluo512/storm,adityasharad/storm,rahulkavale/storm,cluo512/storm,knusbaum/incubator-storm,cluo512/storm,adityasharad/storm,pczb/storm,hmcc/storm,sakanaou/storm,metamx/incubator-storm,nathanmarz/storm,erikdw/storm,d2r/storm-marz,0x726d77/storm,F30/storm,carl34/storm,F30/storm,ujfjhz/storm,hmcl/storm-apache,allenjin/storm,knusbaum/incubator-storm,mesosphere/storm,3manuek/storm-1,erikdw/storm,srishtyagrawal/storm,allenjin/storm,nathanmarz/storm,elancom/storm,taoguan/storm-1,revans2/incubator-storm,ferrero-zhang/storm,Aloomaio/incubator-storm,chrismoulton/storm,raviperi/storm,revans2/storm,erikdw/storm,praisondani/storm,raviperi/storm,3manuek/storm-1,srishtyagrawal/storm,kishorvpatil/incubator-storm,hmcc/storm,raviperi/storm,hmcc/storm,3manuek/storm-1,F30/storm,Crim/storm