Never mind... I got led astray because I cloned my script from one written in-house here. I just noticed that it's calling that daemon() function with the args in the wrong order. :-/