There is this fine little program named Synergy, which I use to share one keyboard with my Mac and my Linux box. In 10.5, my Synergy LoginHook (as described here) stopped working. However, I received a crash report stating "single thread forked" (or something similar), and if the program was started in the foreground (option -f), it still worked.
So i changend my LoginHook a bit and added -f > /tmp/synergy.log 2>&1 & as the last line to start the daemon in the foreground and redirect the output somewhere else. It's a hack, but it works. Here's my final script:
#!/bin/sh
# prog=(/usr/local/bin/synergyc -n $(hostname -s) ip-address-of-server)
prog=(/03_Tools/synergy-1.3.1/synergys -d WARNING -c /03_Tools/synergy-1.3.1/synergy.conf)
### Stop any currently running Synergy client
killall ${prog[0]##*/}
sleep 2
### Start the new client
exec "${prog[@]}" -f > /tmp/synergy.log 2>&1 &Mac OS X Hints
http://hints.macworld.com/article.php?story=20071206002748959