[PATCH] Multicall improvements didn't improve trap

From: Eugen Wissner <belka_at_caraus.de>
Date: Tue, 28 Mar 2023 07:51:15 +0200

Hi,

execline's trap doesn't seem to work in master. Consider the following
script:


#!/bin/execlineb -P

/home/belka/Projects/execline/trap {
  default {
        echo "Caught"
  }
}
sh -c "while :; do echo $$; sleep 1; done"


Sending signals to the trap process does nothing. If I revert
9d55d49dad0f4cb90e6ff2f9b1c3bc46a6fcf05f, trap works as expected. After
some debugging I think that the pids array in trap.c contains garbage
since it isn't initialized statically anymore (see the attached patch).

Best regards
Eugen

Received on Tue Mar 28 2023 - 07:51:15 CEST

This archive was generated by hypermail 2.4.0 : Tue Mar 28 2023 - 07:51:14 CEST