Skip to content

Commit

Permalink
Revert "os: add a convenient way to ignore certain system signals (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov authored Oct 24, 2023
1 parent 0c92c31 commit b39b092
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 102 deletions.
4 changes: 0 additions & 4 deletions vlib/os/signal.v
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,3 @@ pub enum Signal {
}

pub type SignalHandler = fn (Signal)

// An empty system signal handler (callback function) used to mask the specified system signal.
fn ignore_signal_handler(signal Signal) {
}
39 changes: 0 additions & 39 deletions vlib/os/signal_darwin.c.v

This file was deleted.

5 changes: 0 additions & 5 deletions vlib/os/signal_default.c.v

This file was deleted.

42 changes: 0 additions & 42 deletions vlib/os/signal_linux.c.v

This file was deleted.

12 changes: 0 additions & 12 deletions vlib/os/signal_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,3 @@ fn test_signal_opt_return_former_handler() {
// this should work, but makes the CI fail because of a bug in clang -fsanitize=memory
// assert func2 == former_handler
}

fn signal_ignore_in_background_thread() {
os.signal_ignore(.pipe, .urg)
assert true
}

fn test_signal_ignore() {
os.signal_ignore(.pipe, .urg)
assert true
t := spawn signal_ignore_in_background_thread()
t.wait()
}

0 comments on commit b39b092

Please sign in to comment.