Commit graph

44 commits

Author SHA1 Message Date
Mathieu Trossevin 3910d02ae3
Reuse old module names in use 2024-01-12 10:51:40 +01:00
Mathieu Trossevin 45d7fbb36e
Make all receive functions in storefd-listen unsafe
They all rely on a contract that cannot be checked by the compiler so
they are all unsafe.
2024-01-12 10:15:25 +01:00
Mathieu Trossevin 4e1266c877
chore(clippy) 2024-01-12 09:53:38 +01:00
Mathieu Trossevin d6bd9242ca
chore(clippy) 2024-01-11 18:02:41 +01:00
Mathieu Trossevin 89dda462ff
Change repository into a workspace 2024-01-11 18:02:17 +01:00
Mathieu Trossevin 058692a20c
Move NOTIFY_SOCKET implementation into it's own crate
I will add some utility function using both crates into the main one
later.
2024-01-11 17:54:11 +01:00
Mathieu Trossevin 613ae42bc1
Separate LISTEN_FDS implementation into it's own crate 2024-01-11 17:41:12 +01:00
Mathieu Trossevin 099a22fb98
Merge branch 'main' into notify_barrier 2024-01-11 14:44:10 +01:00
Mathieu Trossevin 10c4028f49
Merge branch 'doc-rs' 2024-01-09 10:39:01 +01:00
Mathieu Trossevin c25149382b
Merge branch 'log' 2024-01-09 10:37:12 +01:00
Mathieu Trossevin f61df0da1b
listen: Make one of the closure into a function
This make it a bit easier to debug any problems with it.
2024-01-09 10:35:48 +01:00
Mathieu Trossevin 42aa8b285a
Replace logging crate with log 2024-01-09 10:34:26 +01:00
Mathieu Trossevin 0ce9662f52
Better documentation 2024-01-08 11:25:17 +01:00
Mathieu Trossevin eb5dc84ca8 Merge branch 'main' into notify_barrier 2024-01-06 15:04:15 +01:00
Mathieu Trossevin 907008df66 notify: Use Duration inside the newtype Microseconds 2024-01-06 14:56:41 +01:00
Mathieu Trossevin 31d681ba2a Proper case for TimedOut variant 2024-01-05 22:51:28 +01:00
Mathieu Trossevin 6dae26212d notify: Even better documentation 2024-01-05 22:49:21 +01:00
Mathieu Trossevin cfac28272b Merge branch 'main' into notify_barrier 2024-01-05 22:41:13 +01:00
Mathieu Trossevin f5b9796a32 fix(notify): WatchdogUsec and ExtendTimeoutUsec are in microseconds 2024-01-05 22:33:53 +01:00
Mathieu Trossevin 035f354b04 notify: improve documentation 2024-01-05 22:28:57 +01:00
Mathieu Trossevin d60d906483 notify: Add an equivalent to sd_notify_barrier
This also add an RAII guard for that can be used for the same purpose.
(Mostly for use in a closure.)
2024-01-05 21:27:09 +01:00
Mathieu Trossevin 7d930c3e42
Add a Newtype for custom states
This allow us to do some sanity checks on them.
2024-01-04 14:31:02 +01:00
Mathieu Trossevin cbfa648c4a
Use Newtypes for NotifyState 2024-01-04 13:48:45 +01:00
Mathieu Trossevin 8fdd802e82
Add support for watchdog 2024-01-04 13:47:14 +01:00
Mathieu Trossevin a14254bb83
chore(clippy): Fix false positive 2023-12-18 15:41:52 +01:00
Mathieu Trossevin 1405f1dbea
add some logging 2023-12-18 15:41:16 +01:00
Mathieu Trossevin f026302bec
Enforce automatic use of msrv for development 2023-12-08 17:31:53 +01:00
Mathieu Trossevin b4aad68daa
Document msrv 2023-12-08 17:30:04 +01:00
Mathieu Trossevin edcd6a7013
chore(clippy): Fix some errors 2023-12-08 17:26:04 +01:00
Mathieu Trossevin c282e4bd27
Simplify dependency list 2023-12-08 17:12:25 +01:00
Mathieu Trossevin c8b311c243
Add license text 2023-12-08 17:09:17 +01:00
Mathieu Trossevin 47f8d9c9bf
Fix some documentation 2023-12-08 17:01:42 +01:00
Mathieu Trossevin 776be0c96a
Proper NOTIFY_SOCKET support
Still need to implement watchdog detection.
2023-12-08 16:21:00 +01:00
Mathieu Trossevin c142afbc2c
Start adding support for NOTIFY_SOCKET 2023-12-08 14:46:54 +01:00
Mathieu Trossevin bf2091bb63
Move LISTEN_FD support to a feature 2023-12-08 12:54:41 +01:00
Mathieu Trossevin 7e8f706a1d
Add possibility to receive without duplicating the fds
This is unsafe for roughly the same reasons as `OwnedFd::from_raw_fd`.

Technically the duplication is also unsafe as it is theorically possible
that the fd will be closed before being taken but fcntl should error out
in this case so we can safely ignore that.
2023-12-08 10:11:38 +01:00
Mathieu Trossevin da5aba2882
Revert "Don't duplicate FDs if we are reasonably certain that it isn't needed."
This reverts commit 4485c1f034.
2023-12-08 08:53:19 +01:00
Mathieu Trossevin 4485c1f034 Don't duplicate FDs if we are reasonably certain that it isn't needed. 2023-12-07 22:11:56 +01:00
Mathieu Trossevin 33aabb14d7 Somewhat reduce size of allocation of receive_with_names 2023-12-07 22:01:17 +01:00
Mathieu Trossevin 34f2da2d9b Documentation 2023-12-07 21:39:33 +01:00
Mathieu Trossevin a0728e086f chore(fmt) 2023-12-07 21:13:06 +01:00
Mathieu Trossevin 6984d1a0ea Finish implementing reception of file descriptors. 2023-12-07 21:10:44 +01:00
Mathieu Trossevin e867697c2b Mostly implement file descriptor reception.
This still miss detection of Message Queues.
2023-12-07 20:59:11 +01:00
Mathieu Trossevin d670bad1e9
Initial commit 2023-12-07 18:02:35 +01:00