[Bug 15462] New: Wine blocking on exit when stdout and stderr are piped

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Sep 29 01:55:43 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=15462

           Summary: Wine blocking on exit when stdout and stderr are piped
           Product: Wine
           Version: 1.0.0
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: chris at neko.net.nz


Created an attachment (id=16357)
 --> (http://bugs.winehq.org/attachment.cgi?id=16357)
Output of two simultaneous runs of described script

The issue occurs when concurrently running shell scripts which call Wine
processes whose standard out and standard error are both piped to another
program.

When two instances of a script such as the following are run concurrently, the
first child wine processes started by each of then run together, but in one of
the scripts that child doesn't fully exit until the _other_ script has
completely run and exited. (The Wine process terminates, but the pipeline
doesn't complete and so the script doesn't continue.)

A bash test-case to show this behaviour is as follows:

for iter in first second ; do echo "[$$] running $iter child wine" `date`; wine
sleep-long.exe 2>&1 | tee /dev/null; done; echo "[$$] done " `date`

The problem doesn't occur if either the redirection or pipe is removed, if I
run the scripts in separate Wine environments using $WINEPREFIX, or if I have
another long-lived Wine process which stays running throughout the entire
operation.

An example run with timing is attached.

The test Wine program used above, 'sleep-long', is the following tiny C program
(tested with Microsoft cl and Cygwin GCC with mingw): 

#include <stdio.h>
#include <windows.h>
int main(){
    printf("Started fake compiler, sleeping 8000ms\n");
    Sleep(8000);
    printf("Exiting fake compiler\n");
    exit(0);
}

I've been able to reproduce this problem on several systems and Wine versions
(Debian Lenny with distro-packaged Wine 1.0.0-1, Debian Etch with Wine
1.0-rc1-1~bpo40+1 from Debian backports, Ubuntu Dapper with distro-packaged
Wine 0.9.9-0ubuntu2) but not on one other (Debian Etch with distro-packaged
Wine 0.9.25-2.1)


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list