On Sun, 14 Dec 2008, Count László de Almásy wrote: > I'm hoping someone can help me diagnose why supervising my OpenSim > process causes it to go up to 100% cpu, while when not supervised, I > have no such problems. This is on Debian/Linux amd64, with djb's > latest stock daemontools. > > Here's my run script: > > ====== > bee:/~# cat /service/opensim/run > #!/bin/sh > ulimit -s 262144 > cd /home/opensim/opensim/bin > exec setuidgid opensim mono OpenSim.exe > ====== Try: exec setuidgid opensim mono OpenSim.exe stopping/restarting with svc works as expected. it's just, the cpu > goes right up to 100% with the supervised mono process. running strace > on the process shows what's happening: > > read(0, ""..., 1024) = 0 > read(0, ""..., 1024) = 0 > [...] > > over and over. it's like something is sending the process an empty > character repeatedly. No, it's that the process is repeatedly reading standard input in non-blocking mode, without first checking that there are any bytes to read. That's a bug in OpenSim.exe (or in mono). If it is a supervised daemon process, why is it reading standard input?