diff --git a/src/emx/src/lib/sys/filehandles.c b/src/emx/src/lib/sys/filehandles.c
index 25b08b0..e879fab 100755
a
|
b
|
static __LIBC_PFH fhGet(int fh)
|
1204 | 1204 | if (!_fmode_bin) |
1205 | 1205 | fLibc |= O_TEXT; |
1206 | 1206 | |
| 1207 | /* |
| 1208 | * Blocking flag for a named pipe. |
| 1209 | */ |
| 1210 | if (!DosQueryNPHState((HFILE)fh, &fulMode) && (fulMode & NP_NOWAIT)) |
| 1211 | fLibc |= O_NONBLOCK; |
| 1212 | |
1207 | 1213 | |
1208 | 1214 | /* |
1209 | 1215 | * Allocate a new handle for this filehandle. |
… |
… |
int __libc_FHSetFlags(__LIBC_PFH pFH, int fh, unsigned fFlags)
|
1318 | 1324 | rc = DosSetFHState(fh, fulNewState); |
1319 | 1325 | } |
1320 | 1326 | } |
| 1327 | if (!rc && !DosQueryNPHState(fh, &fulState)) |
| 1328 | { |
| 1329 | ULONG fulNewState; |
| 1330 | LIBC_ASSERTM( ((fulState & NP_NOWAIT) != 0 ) |
| 1331 | == ((pFH->fFlags & O_NONBLOCK) != 0), |
| 1332 | "Nowait flags are out of sync for file hFile %d (%#x)! fulState=%08lx fFlags=%08x\n", |
| 1333 | fh, fh, fulState, pFH->fFlags); |
| 1334 | if (fFlags & O_NONBLOCK) |
| 1335 | fulNewState = fulState | NP_NOWAIT; |
| 1336 | else |
| 1337 | fulNewState = fulState & ~NP_NOWAIT; |
| 1338 | if (fulNewState != fulState) |
| 1339 | { |
| 1340 | fulNewState &= NP_NOWAIT | NP_READMODE_MESSAGE; /* Turn off non-participating bits. */ |
| 1341 | rc = DosSetNPHState(fh, fulNewState); |
| 1342 | } |
| 1343 | } |
1321 | 1344 | FS_RESTORE(); |
1322 | 1345 | |
1323 | 1346 | if (!rc) |