Skip to content

Commit f1169de

Browse files
committed
fix bug in CopyPipe in mac os
1 parent 418fbc8 commit f1169de

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

libdd-library-config/src/otel_process_ctx/reader/copy_pipe_unix.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ impl ProcessMemoryCopy for CopyPipe {
7777
io::ErrorKind::WouldBlock,
7878
"process context memory was unmapped during read",
7979
),
80-
pipe_dirty: false,
80+
// actually false on Linux: if EFAULT is returned, nothing was written;
81+
// should anything have been written already we would get a short write
82+
// However, this is not the case for macOS, despite what its manual
83+
// says: See https://github.com/apple-oss-distributions/xnu/blob/5c306bec31e314fa4d8bbdafb2f6f5a6b7e7b291/bsd/man/man2/write.2#L168-L186
84+
pipe_dirty: true,
8185
});
8286
}
8387
_ => {

0 commit comments

Comments
 (0)