mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 01:25:51 +00:00
Fixed silly EINTR bug with starting dosmod.
This commit is contained in:
parent
7894c2212b
commit
6ba5914005
|
@ -400,15 +400,14 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask )
|
||||||
close(x_fd);
|
close(x_fd);
|
||||||
lpDosTask->task=child;
|
lpDosTask->task=child;
|
||||||
/* wait for child process to signal readiness */
|
/* wait for child process to signal readiness */
|
||||||
do {
|
while (1) {
|
||||||
if (read(lpDosTask->read_pipe,&ret,sizeof(ret))!=sizeof(ret)) {
|
if (read(lpDosTask->read_pipe,&ret,sizeof(ret))==sizeof(ret)) break;
|
||||||
if ((errno==EINTR)||(errno==EAGAIN)) continue;
|
if ((errno==EINTR)||(errno==EAGAIN)) continue;
|
||||||
/* failure */
|
/* failure */
|
||||||
ERR(module,"dosmod has failed to initialize\n");
|
ERR(module,"dosmod has failed to initialize\n");
|
||||||
if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name);
|
if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} while (0);
|
|
||||||
/* the child has now mmaped the temp file, it's now safe to unlink.
|
/* the child has now mmaped the temp file, it's now safe to unlink.
|
||||||
* do it here to avoid leaving a mess in /tmp if/when Wine crashes... */
|
* do it here to avoid leaving a mess in /tmp if/when Wine crashes... */
|
||||||
if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name);
|
if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name);
|
||||||
|
|
Loading…
Reference in a new issue