I've modified suphp to impose the same limits. --AdamChlipala
I've modified Apache 2 suexec to impose ulimits on scripts, and to give up on scripts after a time-out, killing them and all their child processes. --AdamChlipala
I've set up login/cron ulimits, as described on ResourceLimits. --AdamChlipala
I've extended dbtool to add Postgres databases. See UsingDatabases. --AdamChlipala