Your message dated Sun, 13 Jan 2008 11:09:40 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Bug#275751: wine: surprise loss of fd 0 in a simple win32 
program under wine
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: wine
Version: 0.0.20040716-1.2
Severity: normal

The attached program, when compiled as follows:

   i586-mingw32msvc-g++ -Wall -o basic.exe basic.cc -lwsock32

Gives this when run under wine:

   Assertion failed: fd_is_valid(0), file basic.cc, line 32

(line 32 is the final assertion).

It has no errors at all when run on a real Windows 98 or Windows 2000 box.

The problem seems to be a sudden disappearance of fd 0 when I closesocket()
an invalid socket, which is extremely disturbing and probably leads to
other hard-to-find bugs in wine.

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux insight 2.4.19 #3 lun jui 26 19:33:13 EDT 2004 i686 
GNU/Linux

Versions of the packages wine depends on:
ii  debconf        1.3.21         Debian configuration management system
ii  libwine        0.0.20040716-1 Windows Emulator (Library)
ii  xbase-clients  4.2.1-0pre1v2  miscellaneous X clients
rc  xcontrib       3.3.3.1-0.1    XFree contributed clients.
ii  mingw32        3.3.1.20030804 Minimalist GNU win32 (cross) compiler


#include <winsock.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>

static bool fd_is_valid(int fd)
{
    int nfd = dup(fd);
    if (nfd >= 0)
    {
        close(nfd);
        return true;
    }
    return false;
}


int main()
{
    int fd1 = dup(0);
    assert(fd1 >= 0);
    int fd2 = dup(0);
    assert(fd2 >= 0);
    
    assert(fd_is_valid(0));
    close(fd1);
    assert(fd_is_valid(0));
    close(fd2);
    assert(fd_is_valid(0));
    
    closesocket(fd2);
    assert(fd_is_valid(0));
}


--- End Message ---
--- Begin Message ---
This looks fixed, probably long ago. Closing.




--- End Message ---

Reply via email to