--- a/PipeStream.st Mon Nov 08 03:29:58 1993 +0100
+++ b/PipeStream.st Mon Nov 08 03:32:43 1993 +0100
@@ -22,11 +22,12 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.4 1993-10-13 02:13:05 claus Exp $
+$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.5 1993-11-08 02:31:18 claus Exp $
'!
%{
#include <stdio.h>
+#include <errno.h>
#ifndef transputer
# include <sys/types.h>
# include <sys/stat.h>
@@ -117,7 +118,6 @@
|retVal|
- unBuffered := true.
%{
#ifndef transputer
{
@@ -125,12 +125,16 @@
extern OBJ ErrorNumber;
extern errno;
extern int _immediateInterrupt;
+ int savInt;
if (_isString(commandString) && _isString(mode)) {
+ savInt = _immediateInterrupt;
_immediateInterrupt = 1;
- f = (FILE *)popen((char *) _stringVal(commandString),
- (char *) _stringVal(mode));
- _immediateInterrupt = 0;
+ do {
+ f = (FILE *)popen((char *) _stringVal(commandString),
+ (char *) _stringVal(mode));
+ } while ((f == NULL) && (errno == EINTR));
+ _immediateInterrupt = savInt;
if (f == NULL) {
ErrorNumber = _MKSMALLINT(errno);
} else {
@@ -143,6 +147,7 @@
%}
.
retVal notNil ifTrue:[
+ buffered := true.
lobby register:self
].
^ retVal
@@ -161,23 +166,3 @@
self writeonly.
^ self openPipeFor:command withMode:'w'
! !
-
-!PipeStream methodsFor:'redefined basic'!
-
-size
- "redefined since pipes have no size"
-
- ^ self shouldNotImplement
-!
-
-position:newpos
- "redefined since pipes cannot be positioned"
-
- ^ self shouldNotImplement
-!
-
-position
- "redefined since pipes have no position"
-
- ^ self shouldNotImplement
-! !