Skip to content

Commit f3a4fee

Browse files
committed
comment magic number 128
1 parent 4e5b186 commit f3a4fee

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • crates/stackable-operator/src/utils

‎crates/stackable-operator/src/utils/bash.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
/// echo "Run after termination"
1616
/// exit "${product_exit_code}"
1717
/// ```
18+
// A `wait` status above 128 can mean two things:
19+
// 1. bash reports a signal death as `128 + signal`
20+
// 2. an in-progress `wait` abort with such a status when a trapped signal arrives
21+
//
22+
// We wait a second time to get the actual child status, which immediately returns the
23+
// status again in case 1. In case 2 the child is still running and we do need to wait.
24+
//
25+
// See https://www.gnu.org/software/bash/manual/html_node/Signals.html
1826
pub const COMMON_BASH_TRAP_FUNCTIONS: &str = r#"
1927
prepare_signal_handlers()
2028
{

0 commit comments

Comments
 (0)