Fabian Boehm
ad73dcc308
Update nix to 0.29
2024-06-06 16:47:52 +02:00
ridiculousfish
172fb22692
Clean up and correct O_SEARCH definitions
...
Correct the FreeBSD constant and simplify some of the cfg() logic.
2024-05-11 13:20:34 -07:00
Jonathan Krebs
4606b02d44
rustfmt
2024-05-11 11:12:29 -07:00
Jonathan Krebs
a148760963
cd: open directory with O_SEARCH or O_PATH, when the platform supports it
2024-05-11 11:12:29 -07:00
Jonathan Krebs
2ecbdb9ae7
cleanup: fds::open_dir - remove mode argument
...
[w]open_dir does not pass O_CREAT, so the mode argument to open is never used.
also, O_CREAT | O_DIRECTORY could not be used (portably) to create a directory.
(on POSIX does not specify what should happen, on Linux it is EINVAL.)
2024-05-11 11:12:29 -07:00
Mahmoud Al-Qudsi
5f8f799cf7
Replace C++ doc \return
with "Return"
...
quick_replace '\\\\return(s)? ' 'Return$1 ' src/
Filtered to only lines beginning with //
2024-05-06 14:59:36 -05:00
Mahmoud Al-Qudsi
589639a87d
Replace C++-style \p with Markdown backticks
...
quick_replace '\\\\p ([a-zA-Z0-9_]+)' '`$1`' src/
Filtered to only lines beginning with //
2024-05-06 14:59:23 -05:00
Johannes Altmanninger
3cfa09d1bd
Make test_init() return a scope guard
...
To be used in the next commit.
2024-03-24 16:33:35 +01:00
Johannes Altmanninger
c209e6b5fb
Fix clippy lint
2024-03-23 14:26:08 +01:00
Mahmoud Al-Qudsi
0ca199ef98
Change wopen_cloexec()
to return File
2024-03-23 01:34:23 -05:00
Mahmoud Al-Qudsi
8d9d4ce1f9
Add and use separate open_dir() method
...
This is resistant to misuse by including O_DIRECTORY in the open flags and it is
a separate function from {w,}open_cloexec() in preparation for making that one
return a `File` instead of an `OwnedFd`.
2024-03-23 01:15:43 -05:00
Mahmoud Al-Qudsi
c0d68084f7
Add AsFd impl for AutoCloseFd
...
Will be used to remove RawFd usages.
2024-03-22 23:58:12 -05:00
ridiculousfish
5021639db1
Correct some comments and duplicative error messages
...
If we fail to create a pipe, we will report that fact in multiple places; remove
some redundant error reporting.
2024-02-11 12:16:58 -08:00
PolyMeilex
b9ba9e57e8
Use nix & Results
2024-02-11 11:40:27 -08:00
PolyMeilex
971d774e67
Use OwnedFd in AutoClosePipes
2024-02-11 11:40:27 -08:00
Mahmoud Al-Qudsi
f16c132f3c
Fix unused import when pipe2 isn't available
2024-01-28 18:33:11 -06:00
PolyMeilex
6ef8125c96
Return OwnedFd
from open_cloexec
2024-01-27 20:42:13 +01:00
PolyMeilex
2512849ece
Use nix OFlag for open_cloexec
2024-01-27 20:42:13 +01:00
PolyMeilex
6915aeb44c
Use nix mode for open_cloexec
2024-01-27 20:42:13 +01:00
PolyMeilex
23301e4895
Return Result from wopen_cloexec
2024-01-27 20:42:13 +01:00
Fabian Boehm
ac9c5ed1b2
Retry open_cloexec for signals other than SIGINT
...
Fixes #10250
2024-01-25 11:14:31 +01:00
PolyMeilex
f3e8272c5d
Move from libc read/write to nix read/write
...
Replace std from_raw_fd/into_raw_fd dance with nix write
Fixup notifyd build
2024-01-21 11:49:40 -08:00
Mahmoud Al-Qudsi
e02c572738
Fix build error when HAVE_PIPE2 is true
...
NB: I only encountered this when rewriting the cfg detection, which means that
the previous detection wasn't correct since I have pipe2 on Linux but didn't run
into this build error before.
2024-01-13 15:44:03 -06:00
Johannes Altmanninger
3ae20bdba0
Move fish-rust to project root
2024-01-13 03:58:33 +01:00