Show us the code! Better still, show us a small sample script the demonstrates the problem.
In reply to Re: Daemon dies instantly by GrandFather in thread Daemon dies instantly by dd-b