diff options
| author | rsc <devnull@localhost> | 2004-02-09 19:33:05 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-02-09 19:33:05 +0000 |
| commit | d51419bf4397cf13d0c50bf84c125477c6bed307 (patch) | |
| tree | d9a10c72e5b710e7a9f85e632c8b893ecd43dd0a /src/libthread/iocall.c | |
| parent | c1973705501d05e906bd14a0dc25cc4472b5871f (diff) | |
| download | plan9port-d51419bf4397cf13d0c50bf84c125477c6bed307.tar.gz plan9port-d51419bf4397cf13d0c50bf84c125477c6bed307.zip | |
various tweaks.
Diffstat (limited to 'src/libthread/iocall.c')
| -rw-r--r-- | src/libthread/iocall.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libthread/iocall.c b/src/libthread/iocall.c index d9cf9d04..0577f8a0 100644 --- a/src/libthread/iocall.c +++ b/src/libthread/iocall.c @@ -3,6 +3,7 @@ long iocall(Ioproc *io, long (*op)(va_list*), ...) { + char e[ERRMAX]; int ret, inted; Ioproc *msg; @@ -39,11 +40,13 @@ iocall(Ioproc *io, long (*op)(va_list*), ...) va_end(io->arg); ret = io->ret; if(ret < 0) - errstr(io->err, sizeof io->err); + strecpy(e, e+sizeof e, io->err); io->inuse = 0; /* release resources */ while(send(io->creply, &io) == -1) ; + if(ret < 0) + errstr(e, sizeof e); return ret; } |
