Fix: pipe() call didn't ref ofiles properly

This commit is contained in:
Mark 2020-07-05 18:53:55 +03:00
parent 2d5fe1dac1
commit b646a11dc3

View File

@ -247,8 +247,8 @@ int sys_pipe(int *filedes) {
return -EMFILE;
}
thr->fds[fd0] = read_end;
thr->fds[fd1] = write_end;
thr->fds[fd0] = ofile_dup(read_end);
thr->fds[fd1] = ofile_dup(write_end);
filedes[0] = fd0;
filedes[1] = fd1;