lucab / libsystemd-rs

A pure-Rust client library to work with systemd
https://crates.io/crates/libsystemd
Other
106 stars 19 forks source link

activation: do not discard unknown descriptors #52

Closed lucab closed 4 years ago

lucab commented 4 years ago

This tweaks FD-receiving logic to account for file descriptors of an unknown type (possibly invalid, too). Previously this library would just halt and catch fire upon encountering a single FD for which type-detection failed It now logs a warning message but keeps the FD internally in a dedicated "unknown" variant, allowing consumers to recover it and further try to process in some way.

Closes: https://github.com/lucab/libsystemd-rs/issues/46

lucab commented 4 years ago

/cc @ip1981 @nmlt in case you have a time to have a look.

lucab commented 4 years ago

@ip1981 added a fixup commit on top, PTAL.