Q4M + Parallel::Prefork + Signal handling + Log::Minimal conditions precedent: use daemontools & multilog Points: make DB connection after fork do not trap SIGTERM while calling queue_wait(), so that the process can be shut down while waiting for the response from q4m remove $time and add $PID for log. Because I'm using multilog. It prints the tai64n automatically(and, tai64n is better). package O