Repository: tokio-rs/tokio
File: tokio/src/process/mod.rs (Rust)

Code before:
    ///
    /// When this closure is run, aspects such as the stdio file descriptors and
    /// working directory have successfully been changed, so output to these
    /// locations may not appear where intended.
    #[cfg(unix)]
    #[cfg_attr(docsrs, doc(cfg(unix)))]
    pub unsafe fn pre_exec<F>(&mut self, f: F) -> &mut Command
    where
        F: FnMut() -> io::Result<()> + Send + Sync + 'static,
    {
        self.std.pre_exec(f);
        self
    }

    /// Sets the process group ID (PGID) of the child process. Equivalent to a
    /// setpgid call in the child process, but may be more efficient.
    ///
    /// Process groups determine which processes receive signals.
    ///
    /// **Note**: This is an [unstable API][unstable] but will be stabilised once
    /// tokio's MSRV is sufficiently new. See [the documentation on
    /// unstable features][unstable] for details about using unstable features.
    ///
    /// If you want similar behaviour without using this unstable feature you can
    /// create a [`std::process::Command`] and convert that into a
    /// [`crate::process::Command`] using the `From` trait.
    ///
    /// [unstable]: crate#unstable-features
    ///
    /// ```no_run
    /// use tokio::process::Command;
    ///
    /// Command::new("ls")
    ///     .process_group(0)
    ///     .spawn()?
    ///     .wait()
    ///     .await?;
    /// ```
    #[cfg(unix)]
    #[cfg(tokio_unstable)]
    #[cfg_attr(docsrs, doc(cfg(all(unix, tokio_unstable))))]
    pub fn process_group(&mut self, pgroup: i32) -> &mut Command {
        self.std.process_group(pgroup);
        self
    }

    /// Executes the command as a child process, returning a handle to it.
    ///
    /// By default, stdin, stdout and stderr are inherited from the parent.
    ///
    /// This method will spawn the child process synchronously and return a

Review comment (suggestion):
We don't use `crate` in our documentation.
```suggestion
    /// [`tokio::process::Command`] using the `From` trait.
```
If this link doesn't work out of the box, then you can add
```md
[`tokio::process::Command`]: crate::process::Command
```

Code after:
    ///
    /// When this closure is run, aspects such as the stdio file descriptors and
    /// working directory have successfully been changed, so output to these
    /// locations may not appear where intended.
    #[cfg(unix)]
    #[cfg_attr(docsrs, doc(cfg(unix)))]
    pub unsafe fn pre_exec<F>(&mut self, f: F) -> &mut Command
    where
        F: FnMut() -> io::Result<()> + Send + Sync + 'static,
    {
        self.std.pre_exec(f);
        self
    }

    /// Sets the process group ID (PGID) of the child process. Equivalent to a
    /// setpgid call in the child process, but may be more efficient.
    ///
    /// Process groups determine which processes receive signals.
    ///
    /// **Note**: This is an [unstable API][unstable] but will be stabilised once
    /// tokio's MSRV is sufficiently new. See [the documentation on
    /// unstable features][unstable] for details about using unstable features.
    ///
    /// If you want similar behaviour without using this unstable feature you can
    /// create a [`std::process::Command`] and convert that into a
    /// [`tokio::process::Command`] using the `From` trait.
    ///
    /// [unstable]: crate#unstable-features
    /// [`tokio::process::Command`]: crate::process::Command
    ///
    /// ```no_run
    /// use tokio::process::Command;
    ///
    /// let command = Command::new("ls")
    ///         .process_group(0);
    /// ```
    #[cfg(unix)]
    #[cfg(tokio_unstable)]
    #[cfg_attr(docsrs, doc(cfg(all(unix, tokio_unstable))))]
    pub fn process_group(&mut self, pgroup: i32) -> &mut Command {
        self.std.process_group(pgroup);
        self
    }

    /// Executes the command as a child process, returning a handle to it.
    ///
    /// By default, stdin, stdout and stderr are inherited from the parent.
    ///
    /// This method will spawn the child process synchronously and return a
    /// handle to a future-aware child process. The `Child` returned implements
    /// `Future` itself to acquire the `ExitStatus` of the child, and otherwise