Basically, you want to
- disassociate yourself from the tty
- use ioctl() or POSIX::setsid()
- re-open your file descriptors.
- possibly chroot and/or change your working directory to '/'
- fork && exit.
Proc::Daemon will do it all for you though.
-sauoq
"My two cents aren't worth a dime.";