From 6ba591400543f0ddf4c3e0ececc2c10df38b8f11 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Sat, 22 May 1999 18:48:09 +0000 Subject: [PATCH] Fixed silly EINTR bug with starting dosmod. --- loader/dos/module.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/loader/dos/module.c b/loader/dos/module.c index 404b3aaf2bb..b67da36f79f 100644 --- a/loader/dos/module.c +++ b/loader/dos/module.c @@ -400,15 +400,14 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask ) close(x_fd); lpDosTask->task=child; /* wait for child process to signal readiness */ - do { - if (read(lpDosTask->read_pipe,&ret,sizeof(ret))!=sizeof(ret)) { + while (1) { + if (read(lpDosTask->read_pipe,&ret,sizeof(ret))==sizeof(ret)) break; if ((errno==EINTR)||(errno==EAGAIN)) continue; /* failure */ ERR(module,"dosmod has failed to initialize\n"); if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name); return FALSE; - } - } while (0); + } /* 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... */ if (lpDosTask->mm_name[0]!=0) unlink(lpDosTask->mm_name);