Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Closing all open file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-09-15 (18:03)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Closing all open file descriptors
On Sat, 2007-09-15 at 16:29 +0200, Markus E L wrote:

> GTK and the X11 library without doubt open a plethora of file
> descriptors. If now you fork() in a gtk event handler -- can you tell
> me what happens to those file descriptors? 

No, so don't do it. Instead, start a separate process,
and send it a message from the GTK event handler.
Then THAT process does the fork/exec to start the daemon.

If you want to spawn a demon, get another demon to do it 
for you:)

I suggest OP examine:




[which was written by one of my friends <raf at raf dot org>]

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: