Skip to main content

main

Attribute Macro main 

Source
#[main]
Expand description

A procedural macro to define the main function of a uutils binary.

This macro handles:

  • SIGPIPE state capture at process startup (before Rust runtime overrides it)
  • SIGPIPE restoration to default if parent didn’t explicitly ignore it
  • Disabling Rust signal handlers for proper core dumps
  • Error handling and exit code management