File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88//! use std::mem::MaybeUninit;
99//!
1010//! # fn test() -> io::Result<()> {
11- //! // Creeate an inotify object. In this example, we use `NONBLOCK` so that
12- //! // the reader fails with `WOULDBLOCk` when no events are ready. Otherwise
13- //! // it will block until at least one event is ready.
11+ //! // Create an inotify object. In this example, we use `NONBLOCK` so that the
12+ //! // reader fails with `WOULDBLOCk` when no events are ready. Otherwise it
13+ //! // will block until at least one event is ready.
1414//! let inotify = inotify::init(inotify::CreateFlags::NONBLOCK)?;
1515//!
1616//! // Add a directory to watch.
2020//! inotify::WatchFlags::ALL_EVENTS,
2121//! )?;
2222//!
23- //! // Generate some events in the watched directory...
23+ //! // Generate some events in the watched directory…
2424//!
2525//! // Loop over pending events.
2626//! let mut buf = [MaybeUninit::uninit(); 512];
3333//! Ok(entry) => entry,
3434//! };
3535//!
36- //! // Use `entry`...
36+ //! // Use `entry`…
3737//! }
3838//!
3939//! # Ok(())
Original file line number Diff line number Diff line change @@ -643,8 +643,10 @@ const fn new_raw_protocol(u: u32) -> RawProtocol {
643643}
644644
645645/// `IPPROTO_*` and other constants for use with [`socket`], [`socket_with`],
646- /// and [`socketpair`] when a nondefault value is desired. See the [`ipproto`],
647- /// [`sysproto`], and [`netlink`] modules for possible values.
646+ /// and [`socketpair`] when a nondefault value is desired.
647+ ///
648+ /// See the [`ipproto`], [`sysproto`], and [`netlink`] modules for possible
649+ /// values.
648650///
649651/// For the default values, such as `IPPROTO_IP` or `NETLINK_ROUTE`, pass
650652/// `None` as the `protocol` argument in these functions.
Original file line number Diff line number Diff line change @@ -110,10 +110,11 @@ pub fn dumpable_behavior() -> io::Result<DumpableBehavior> {
110110
111111const PR_SET_DUMPABLE : c_int = 4 ;
112112
113- /// Set the state of the `dumpable` attribute, which determines whether the
114- /// process can be traced and whether core dumps are produced for the calling
115- /// process upon delivery of a signal whose default behavior is to produce a
116- /// core dump.
113+ /// Set the state of the `dumpable` attribute.
114+ ///
115+ /// This attribute determines whether the process can be traced and whether
116+ /// core dumps are produced for the calling process upon delivery of a signal
117+ /// whose default behavior is to produce a core dump.
117118///
118119/// A similar function with the same name is available on FreeBSD (as part of
119120/// the `procctl` interface), but it has an extra argument which allows to
Original file line number Diff line number Diff line change 1313//! // A type describing the data to be shared.
1414//! #[repr(C)]
1515//! struct MyBufferType {
16- //! // ...
16+ //! // …
1717//! }
1818//!
1919//! // Create the shared memory object.
4343//! )?
4444//! };
4545//!
46- //! // Use `ptr`...
46+ //! // Use `ptr`…
4747//!
4848//! // Remove the shared memory object name.
4949//! shm::unlink(shm_path)?;
You can’t perform that action at this time.
0 commit comments