blob: 5716715a19471d2a4f9b75b3303190c9a6c205a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- tcl8.3.2/unix/tclUnixPipe.c Thu Aug 17 17:46:15 2000
+++ tcl8.3.2/unix/tclUnixPipe.c.new Fri Feb 15 12:30:19 2002
@@ -950,12 +950,16 @@
* nonblocking, the read will never block.
*/
- bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
- if (bytesRead > -1) {
- return bytesRead;
+ while (1) {
+ bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
+ if (bytesRead > -1) {
+ return bytesRead;
+ }
+ if ( errno != EINTR ) {
+ *errorCodePtr = errno;
+ return -1;
+ }
}
- *errorCodePtr = errno;
- return -1;
}
/*
|