From mint-bounce@lists.fishpool.fi  Tue Jan 22 17:26:35 2008
X-Original-To: fnaumann@mail.boerde.de
Delivered-To: fnaumann@mail.boerde.de
Date: Tue, 30 Oct 2007 09:05:56 +0100 (CET)
From: Frank Naumann <fnaumann@boerde.de>
To: Jo Even Skarstein <joska@online.no>
Cc: mint@fishpool.com
Subject: Re: [MiNT] SV: Redirecting stdio using Fforce/Fdup
In-Reply-To: <203616293.160111193668489141.JavaMail.adm-moff@moffice5.nsc.no>
Message-ID: <Pine.LNX.4.60.0710300856060.20024@shell.boerde.de>
References: <44180264.137741193650999885.JavaMail.adm-moff@moffice5.nsc.no>
  <Pine.LNX.4.60.0710291413570.20024@shell.boerde.de>
 <203616293.160111193668489141.JavaMail.adm-moff@moffice5.nsc.no>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-To: mint-bounce@lists.fishpool.fi
X-original-sender: fnaumann@boerde.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>
X-Virus-Scanned: by amavisd-new at relay.boerde.de
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de
X-Spam-Status: No, hits=-1.0 tagged_above=-50.5 required=7.0 tests=BAYES_00
X-Spam-Level: 
Status: 
X-Status: 
X-Keywords:                   

Hello!

> Yes, but there are no programming examples. Also, there are 
> contradicting information on whether the redirected files are closed 
> when the child exits or not.

It's simple, if a process terminate the OS release all attached resources.

As long the process is running it hold the attached resources and the OS 
don't release any resource (except on special request by the process, 
calling Fclose/Mfree/... for example).

In case for a pipe, if one side is closed because the process terminated 
or closed the pipe the other side is still, alive. The pipe is then called 
widowed. Any write request on such a widowed pipe result in sending a 
SIGPIPE (I don't know how good MagiC follow these rules).

If you have a Linux just take a look into man 2 pipe.


Regards,
Frank

--
ATARI FALCON 060 // MILAN 060
-----------------------------------------
e-Mail: fnaumann@freemint.de


