9pfuse: ignore write errors on fusefd

FUSE makes a reply write fail if the reply is no
longer wanted.
This commit is contained in:
Russ Cox 2008-07-24 07:59:58 -07:00
parent 77fb6ec713
commit 6f61477d26

View file

@ -241,8 +241,7 @@ replyfuse(FuseMsg *m, void *arg, int narg)
vec[1].iov_len = narg;
nvec++;
}
if(writev(fusefd, vec, nvec) < 0)
sysfatal("replyfuse: %r");
writev(fusefd, vec, nvec);
freefusemsg(m);
}
@ -259,8 +258,7 @@ replyfuseerrno(FuseMsg *m, int e)
hdr.unique = m->hdr->unique;
if(debug)
fprint(2, "FUSE <- %#G\n", m->hdr, &hdr, 0);
if(write(fusefd, &hdr, sizeof hdr) < 0)
sysfatal("replyfuseerror: %r");
write(fusefd, &hdr, sizeof hdr);
freefusemsg(m);
}