blob: eaa4879dc43c44b286716236552a18f8bd53d68a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
Revert trap behavior for the sake of autoconf-generated configure scripts.
The problem here is that bash -c 'trap 0' works, but sh -c 'trap 0' doesn't
work because the bash developers are trying to adhere to POSIX in that case.
Since all the configure scripts are #!/bin/sh, this breaks them... That's bad
news and will need some time to fix, so it's easier to fix here for the
moment.
http://bugs.gentoo.org/58703
--- bash-3.0/builtins/trap.def.noposix 2004-07-28 22:38:38.000000000 -0400
+++ bash-3.0/builtins/trap.def 2004-07-28 22:39:01.948314454 -0400
@@ -122,12 +122,18 @@
operation = SET;
first_arg = list->word->word;
+#if 0
/* When in posix mode, the historical behavior of looking for a
missing first argument is disabled. To revert to the original
signal handling disposition, use `-' as the first argument. */
if (posixly_correct == 0 && first_arg && *first_arg &&
(*first_arg != '-' || first_arg[1]) &&
signal_object_p (first_arg, opt) && list->next == 0)
+#else
+ if (first_arg && *first_arg &&
+ (*first_arg != '-' || first_arg[1]) &&
+ signal_object_p (first_arg, opt) && list->next == 0)
+#endif
operation = REVERT;
else
{
|