
Front-ends or libraries may set signals to be ignored, which gets inherited across fork and exec. This can cause scripts to malfunction if they expect the signal. To make matters worse, scripts written in bash can't reset signals that were ignored when bash was started. Fixes FS#56756 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
11 lines
373 B
Python
11 lines
373 B
Python
self.description = "Reset signals before running scriptlets/hooks"
|
|
|
|
p1 = pmpkg("dummy")
|
|
# check if SIGPIPE is ignored, it should be fatal, but GPGME ignores it
|
|
p1.install['post_install'] = "kill -PIPE $$; echo fail > sigpipe_was_ignored"
|
|
self.addpkg(p1)
|
|
|
|
self.args = "-U %s" % p1.filename()
|
|
|
|
self.addrule("PACMAN_RETCODE=0")
|
|
self.addrule("!FILE_EXIST=sigpipe_was_ignored")
|