#150 closing a duplicated filehandle invalidates all handles


When you duplicate a file handle (for example with int
0x21, ah = 0x45), and then close either the old or the
new handle with DOS_CloseFile, the underlying DOS_File
will get closed, even though there is still a valid
filehandle pointing to it.

(as discussed on IRC on 8 August)


  • Peter Veenstra

    Peter Veenstra - 2003-08-09

    Logged In: YES

    Assigned to Finsterr as he seems to make more changes in
    this code.

  • Ulf Wohlers

    Ulf Wohlers - 2003-08-11

    Logged In: YES

    What operations do i have to perform in IDA to get this
    wrong behaviour ? IDA seems to work fine here (it doesnt
    call the duplicate handle function). I'm using IDA v3.05 (16

  • Willem Jan Palenstijn

    Logged In: YES

    this happens in IDA 4.15. You don't have to do anything
    special to make it happen; just start ida and open a file.

    The next problem with running IDA is somewhat related: IDA
    seems to open "con" about 15 times, and tries to close most
    of them. Dosbox refuses to close device file handles,
    though, so the entire psp is quickly filled up with 'con'
    devices, leaving no room for real files.

    Maybe (some of?) the psp entries for devices should be
    closable after all, as long as one remains?

  • Willem Jan Palenstijn

    Logged In: YES

    Today's CVS changes ("dont duplicate console handles") seem
    to have fixed IDA not opening a database properly.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks