mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-15 15:57:13 +00:00
unixfork: read() returns ssize_t. (#77)
We should do this more widely, but this will let us see if we have any problems across platforms from making this change.
This commit is contained in:
parent
a97b2a3501
commit
ab7329d602
@ -57,10 +57,10 @@ char shcom[512]; /* Here because I'm suspicious of */
|
||||
/* large allocations on the stack */
|
||||
|
||||
|
||||
static __inline__ int
|
||||
static __inline__ ssize_t
|
||||
SAFEREAD(int f, char *b, int c)
|
||||
{
|
||||
int res;
|
||||
ssize_t res;
|
||||
loop:
|
||||
res = read(f, b, c);
|
||||
if ((res < 0)) {
|
||||
@ -303,7 +303,7 @@ int fork_Unix() {
|
||||
res = fcntl(LispPipeIn, F_SETFL, res);
|
||||
|
||||
while (1) {
|
||||
int len;
|
||||
ssize_t len;
|
||||
len = 0;
|
||||
while (len != 4) {
|
||||
if ((len = SAFEREAD(LispPipeIn, IOBuf, 4)) < 0) { /* Get packet */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user