- if(fds[fdn] == null || !fds[fdn].writable()) return -EBADFD;
- try {
- byte[] buf = byteBuf(count);
- copyin(addr,buf,count);
- return fds[fdn].write(buf,0,count);
- } catch(IOException e) {
- // NOTE: This should really send a SIGPIPE
- if(e.getMessage().equals("Pipe closed")) return sys_exit(128+13);
- return -EIO;
- }
+ if(fds[fdn] == null) return -EBADFD;
+ byte[] buf = byteBuf(count);
+ copyin(addr,buf,count);
+ return fds[fdn].write(buf,0,count);