On 2008 Oct 20, at 15:42, Rouan van Dalen wrote:
I would like to write a very very simple haskell daemon that
disconnects itself from the terminal
and sists in the background doing something.
What is the easiest way to go about this. I have tried several
things but can't seem to
get the process disconnected from the terminal.
System.Posix.Process.createSession makes the current process a
separate session with no controlling terminal assigned to it.
(Acquiring a controlling terminal afterward is, sadly, nonportable:
some systems do it automatically unless you open() with O_NOCTTY, some
require you to open and ioctl(TIOCSCTTY).)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe