MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / reset_signal_pipe_handler

Function reset_signal_pipe_handler

src/cli.rs:11–21  ·  view source on GitHub ↗

This should be called before calling any cli method or printing any output.

()

Source from the content-addressed store, hash-verified

9
10/// This should be called before calling any cli method or printing any output.
11pub fn reset_signal_pipe_handler() {
12 #[cfg(target_family = "unix")]
13 {
14 use nix::sys::signal;
15
16 unsafe {
17 let _ = signal::signal(signal::Signal::SIGPIPE, signal::SigHandler::SigDfl)
18 .map_err(|e| println!("{:?}", e));
19 }
20 }
21}
22
23/// May the Code be with You
24#[derive(Parser)]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected