English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 (17:44)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Closing all open file descriptors
On Sat, 2007-09-15 at 16:16 +0200, Markus E L wrote:

> Let's assume (as an example) I'm starting a demon / background process
> by clicking on an icon in a desktop environment. Which file
> descriptors are open when the demon starts executing?

The solution to all problems in Computer Science is already known:
"add another level of indirection". [Tcl and Perl version ..
double the quotes and escape characters .. :]

In this case:

	a) the Desktop must keep track of its file descriptors F
	b) it starts Helper which is passed F and closes them
	c) Helper then starts Plugin with no open file descriptors:
	--> Plugin doesn't need to close inherited file descriptors

If Desktop doesn't do that, Desktop is screwed.

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