Skip to main content

is_pdsh_compat_mode

Function is_pdsh_compat_mode 

Source
pub fn is_pdsh_compat_mode() -> bool
Expand description

Checks if pdsh compatibility mode should be enabled.

Returns true if any of the following conditions are met:

  1. The BSSH_PDSH_COMPAT environment variable is set to “1” or “true”
  2. The binary name (argv[0]) is “pdsh” or starts with “pdsh.”

§Examples

// When BSSH_PDSH_COMPAT=1 is set in the environment,
// is_pdsh_compat_mode() returns true.
// (Example is marked `ignore` because mutating environment variables in
// Rust 2024 requires `unsafe`; see `EnvGuard` in `src/test_helpers`.)