ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/26/20:50:05

Date: Wed, 26 Jun 1996 20:46:43 -0400
From: dj (DJ Delorie)
Message-Id: <199606270046.UAA17700@delorie.com>
To: demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De
CC: djgpp AT delorie DOT com
In-reply-to: <31D0FDC2.15FB@LSTM.Ruhr-UNI-Bochum.De> (message from Thomas Demmer on Wed, 26 Jun 1996 10:07:14 +0100)
Subject: Re: FSE, some questions

> "The module is responsible for calling _close() on
> the descriptor after setting the handler function to 
> zero in the extended close handler"
>
> This caused _close to trigger my handler again, obviously
> not what I intended. 

Did you zero out the handler function?  You *must* do that to prevent
recursion.  Use the same mechanism you used to set it to your handler
in the first place.

Why close it?  The open simulator opens "NUL" (/dev/null for unix
weenies) so that it has the use of a file descriptor that (1) is an
expected small value, and (2) dos won't use.  You must close this
descriptor to avoid running out of them.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019