Background information:
I sometimes need to stop oolite without closing the program (pause still eats CPU), I usually start oolite from the WindowMaker menu so I can't type ^Z and suspend it.
I tried to use STOP and CONT signals: first a grep on ps output to find the oolite pid, then a 'kill -s(STOP|CONT)' to that process to stop/restart the program.
Since I am lazy, I decided to write this small script
Code: Select all
#!/bin/sh
kill -s STOP `ps -fu $LOGNAME | grep oolite | grep -v grep | awk '{ print $2 }'`
The point is that it seems that there's a lock somewhere that cause oolite and X11 to deadlock. I thought it was due oolite log going to the console, but got the freeze with an oolite instance launched from the terminal.
The black magic is that if I find the pid with a grep
Code: Select all
ps -fu saint | grep oolite
Code: Select all
kill -s STOP /the pid I got with the previous command/