@@ -175,6 +175,11 @@ impl Drop for OwnedFd { |
|
|
175 |
175 |
// the file descriptor was closed or not, and if we retried (for |
176 |
176 |
// something like EINTR), we might close another valid file descriptor |
177 |
177 |
// opened after we closed ours. |
|
178 |
+// However, this is usually justified, as some of the major Unices |
|
179 |
+// do make sure to always close the FD, even when `close()` is interrupted, |
|
180 |
+// and the scenario is rare to begin with. |
|
181 |
+// Helpful link to an epic discussion by POSIX workgroup: |
|
182 |
+// http://austingroupbugs.net/view.php?id=529 |
178 |
183 |
#[cfg(not(target_os = "hermit"))] |
179 |
184 |
{ |
180 |
185 |
#[cfg(unix)] |