We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
set_nonblocking
new
1 parent 57d9647 commit 0a5230aCopy full SHA for 0a5230a
src/unix.rs
@@ -29,6 +29,8 @@ impl Client {
29
// wrong!
30
const BUFFER: [u8; 128] = [b'|'; 128];
31
32
+ set_nonblocking(client.write.as_raw_fd(), true)?;
33
+
34
while limit > 0 {
35
let n = limit.min(BUFFER.len());
36
@@ -63,7 +65,6 @@ impl Client {
63
65
}
64
66
67
_ => {
- set_nonblocking(pipes[1], true)?;
68
return Ok(Client::from_fds(pipes[0], pipes[1]));
69
70
@@ -73,9 +74,6 @@ impl Client {
73
74
cvt(libc::pipe(pipes.as_mut_ptr()))?;
75
drop(set_cloexec(pipes[0], true));
76
drop(set_cloexec(pipes[1], true));
-
77
78
79
Ok(Client::from_fds(pipes[0], pipes[1]))
80
81
0 commit comments