| ... | @@ -869,7 +869,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { | ... | @@ -869,7 +869,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { |
| 869 | .INTR => continue, | 869 | .INTR => continue, |
| 870 | .INVAL => unreachable, | 870 | .INVAL => unreachable, |
| 871 | .FAULT => unreachable, | 871 | .FAULT => unreachable, |
| 872 | .NOENT => return error.ProcessNotFound, | 872 | .SRCH => return error.ProcessNotFound, |
| 873 | .AGAIN => return error.WouldBlock, | 873 | .AGAIN => return error.WouldBlock, |
| 874 | .CANCELED => return error.Canceled, | 874 | .CANCELED => return error.Canceled, |
| 875 | .BADF => return error.NotOpenForReading, // Can be a race condition. | 875 | .BADF => return error.NotOpenForReading, // Can be a race condition. |
| ... | @@ -933,7 +933,7 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize { | ... | @@ -933,7 +933,7 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize { |
| 933 | .INTR => continue, | 933 | .INTR => continue, |
| 934 | .INVAL => unreachable, | 934 | .INVAL => unreachable, |
| 935 | .FAULT => unreachable, | 935 | .FAULT => unreachable, |
| 936 | .NOENT => return error.ProcessNotFound, | 936 | .SRCH => return error.ProcessNotFound, |
| 937 | .AGAIN => return error.WouldBlock, | 937 | .AGAIN => return error.WouldBlock, |
| 938 | .BADF => return error.NotOpenForReading, // can be a race condition | 938 | .BADF => return error.NotOpenForReading, // can be a race condition |
| 939 | .IO => return error.InputOutput, | 939 | .IO => return error.InputOutput, |
| ... | @@ -1013,7 +1013,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { | ... | @@ -1013,7 +1013,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { |
| 1013 | .INTR => continue, | 1013 | .INTR => continue, |
| 1014 | .INVAL => unreachable, | 1014 | .INVAL => unreachable, |
| 1015 | .FAULT => unreachable, | 1015 | .FAULT => unreachable, |
| 1016 | .NOENT => return error.ProcessNotFound, | 1016 | .SRCH => return error.ProcessNotFound, |
| 1017 | .AGAIN => return error.WouldBlock, | 1017 | .AGAIN => return error.WouldBlock, |
| 1018 | .BADF => return error.NotOpenForReading, // Can be a race condition. | 1018 | .BADF => return error.NotOpenForReading, // Can be a race condition. |
| 1019 | .IO => return error.InputOutput, | 1019 | .IO => return error.InputOutput, |
| ... | @@ -1155,7 +1155,7 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { | ... | @@ -1155,7 +1155,7 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { |
| 1155 | .INTR => continue, | 1155 | .INTR => continue, |
| 1156 | .INVAL => unreachable, | 1156 | .INVAL => unreachable, |
| 1157 | .FAULT => unreachable, | 1157 | .FAULT => unreachable, |
| 1158 | .NOENT => return error.ProcessNotFound, | 1158 | .SRCH => return error.ProcessNotFound, |
| 1159 | .AGAIN => return error.WouldBlock, | 1159 | .AGAIN => return error.WouldBlock, |
| 1160 | .BADF => return error.NotOpenForReading, // can be a race condition | 1160 | .BADF => return error.NotOpenForReading, // can be a race condition |
| 1161 | .IO => return error.InputOutput, | 1161 | .IO => return error.InputOutput, |
| ... | @@ -1277,7 +1277,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { | ... | @@ -1277,7 +1277,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { |
| 1277 | .INTR => continue, | 1277 | .INTR => continue, |
| 1278 | .INVAL => return error.InvalidArgument, | 1278 | .INVAL => return error.InvalidArgument, |
| 1279 | .FAULT => unreachable, | 1279 | .FAULT => unreachable, |
| 1280 | .NOENT => return error.ProcessNotFound, | 1280 | .SRCH => return error.ProcessNotFound, |
| 1281 | .AGAIN => return error.WouldBlock, | 1281 | .AGAIN => return error.WouldBlock, |
| 1282 | .BADF => return error.NotOpenForWriting, // can be a race condition. | 1282 | .BADF => return error.NotOpenForWriting, // can be a race condition. |
| 1283 | .DESTADDRREQ => unreachable, // `connect` was never called. | 1283 | .DESTADDRREQ => unreachable, // `connect` was never called. |
| ... | @@ -1353,7 +1353,7 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!usize { | ... | @@ -1353,7 +1353,7 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!usize { |
| 1353 | .INTR => continue, | 1353 | .INTR => continue, |
| 1354 | .INVAL => return error.InvalidArgument, | 1354 | .INVAL => return error.InvalidArgument, |
| 1355 | .FAULT => unreachable, | 1355 | .FAULT => unreachable, |
| 1356 | .NOENT => return error.ProcessNotFound, | 1356 | .SRCH => return error.ProcessNotFound, |
| 1357 | .AGAIN => return error.WouldBlock, | 1357 | .AGAIN => return error.WouldBlock, |
| 1358 | .BADF => return error.NotOpenForWriting, // Can be a race condition. | 1358 | .BADF => return error.NotOpenForWriting, // Can be a race condition. |
| 1359 | .DESTADDRREQ => unreachable, // `connect` was never called. | 1359 | .DESTADDRREQ => unreachable, // `connect` was never called. |
| ... | @@ -1443,7 +1443,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { | ... | @@ -1443,7 +1443,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { |
| 1443 | .INTR => continue, | 1443 | .INTR => continue, |
| 1444 | .INVAL => return error.InvalidArgument, | 1444 | .INVAL => return error.InvalidArgument, |
| 1445 | .FAULT => unreachable, | 1445 | .FAULT => unreachable, |
| 1446 | .NOENT => return error.ProcessNotFound, | 1446 | .SRCH => return error.ProcessNotFound, |
| 1447 | .AGAIN => return error.WouldBlock, | 1447 | .AGAIN => return error.WouldBlock, |
| 1448 | .BADF => return error.NotOpenForWriting, // Can be a race condition. | 1448 | .BADF => return error.NotOpenForWriting, // Can be a race condition. |
| 1449 | .DESTADDRREQ => unreachable, // `connect` was never called. | 1449 | .DESTADDRREQ => unreachable, // `connect` was never called. |
| ... | @@ -1528,7 +1528,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usiz | ... | @@ -1528,7 +1528,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usiz |
| 1528 | .INTR => continue, | 1528 | .INTR => continue, |
| 1529 | .INVAL => return error.InvalidArgument, | 1529 | .INVAL => return error.InvalidArgument, |
| 1530 | .FAULT => unreachable, | 1530 | .FAULT => unreachable, |
| 1531 | .NOENT => return error.ProcessNotFound, | 1531 | .SRCH => return error.ProcessNotFound, |
| 1532 | .AGAIN => return error.WouldBlock, | 1532 | .AGAIN => return error.WouldBlock, |
| 1533 | .BADF => return error.NotOpenForWriting, // Can be a race condition. | 1533 | .BADF => return error.NotOpenForWriting, // Can be a race condition. |
| 1534 | .DESTADDRREQ => unreachable, // `connect` was never called. | 1534 | .DESTADDRREQ => unreachable, // `connect` was never called. |
| ... | @@ -1607,6 +1607,9 @@ pub const OpenError = error{ | ... | @@ -1607,6 +1607,9 @@ pub const OpenError = error{ |
| 1607 | /// On Windows, `\\server` or `\\server\share` was not found. | 1607 | /// On Windows, `\\server` or `\\server\share` was not found. |
| 1608 | NetworkNotFound, | 1608 | NetworkNotFound, |
| 1609 | | 1609 | |
| | 1610 | /// This error occurs in Linux if the process to be open was not found. |
| | 1611 | ProcessNotFound, |
| | 1612 | |
| 1610 | /// One of these three things: | 1613 | /// One of these three things: |
| 1611 | /// * pathname refers to an executable image which is currently being | 1614 | /// * pathname refers to an executable image which is currently being |
| 1612 | /// executed and write access was requested. | 1615 | /// executed and write access was requested. |
| ... | @@ -1666,6 +1669,7 @@ pub fn openZ(file_path: [*:0]const u8, flags: O, perm: mode_t) OpenError!fd_t { | ... | @@ -1666,6 +1669,7 @@ pub fn openZ(file_path: [*:0]const u8, flags: O, perm: mode_t) OpenError!fd_t { |
| 1666 | .NFILE => return error.SystemFdQuotaExceeded, | 1669 | .NFILE => return error.SystemFdQuotaExceeded, |
| 1667 | .NODEV => return error.NoDevice, | 1670 | .NODEV => return error.NoDevice, |
| 1668 | .NOENT => return error.FileNotFound, | 1671 | .NOENT => return error.FileNotFound, |
| | 1672 | .SRCH => return error.ProcessNotFound, |
| 1669 | .NOMEM => return error.SystemResources, | 1673 | .NOMEM => return error.SystemResources, |
| 1670 | .NOSPC => return error.NoSpaceLeft, | 1674 | .NOSPC => return error.NoSpaceLeft, |
| 1671 | .NOTDIR => return error.NotDir, | 1675 | .NOTDIR => return error.NotDir, |
| ... | @@ -1837,6 +1841,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: O, mode: mode_t) O | ... | @@ -1837,6 +1841,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: O, mode: mode_t) O |
| 1837 | .NFILE => return error.SystemFdQuotaExceeded, | 1841 | .NFILE => return error.SystemFdQuotaExceeded, |
| 1838 | .NODEV => return error.NoDevice, | 1842 | .NODEV => return error.NoDevice, |
| 1839 | .NOENT => return error.FileNotFound, | 1843 | .NOENT => return error.FileNotFound, |
| | 1844 | .SRCH => return error.ProcessNotFound, |
| 1840 | .NOMEM => return error.SystemResources, | 1845 | .NOMEM => return error.SystemResources, |
| 1841 | .NOSPC => return error.NoSpaceLeft, | 1846 | .NOSPC => return error.NoSpaceLeft, |
| 1842 | .NOTDIR => return error.NotDir, | 1847 | .NOTDIR => return error.NotDir, |
| ... | @@ -5483,6 +5488,7 @@ pub const RealPathError = error{ | ... | @@ -5483,6 +5488,7 @@ pub const RealPathError = error{ |
| 5483 | FileSystem, | 5488 | FileSystem, |
| 5484 | BadPathName, | 5489 | BadPathName, |
| 5485 | DeviceBusy, | 5490 | DeviceBusy, |
| | 5491 | ProcessNotFound, |
| 5486 | | 5492 | |
| 5487 | SharingViolation, | 5493 | SharingViolation, |
| 5488 | PipeBusy, | 5494 | PipeBusy, |