Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
if (stream->pipe[0] >= 0) {
close(stream->pipe[0]);
- stream->pipe[0] = -1;
+ stream->pipe[0] = -EBADF;
}
}
// Close the write end of the pipe
if (stream->pipe[1] >= 0) {
close(stream->pipe[1]);
- stream->pipe[1] = -1;
+ stream->pipe[1] = -EBADF;
}
// Register the file descriptor with the event loop
// Close the read end of the pipe
if (stream->pipe[0] >= 0) {
close(stream->pipe[0]);
- stream->pipe[0] = -1;
+ stream->pipe[0] = -EBADF;
}
return 0;