.
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=25
This commit is contained in:
parent
99eaf946d6
commit
e34d103d54
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
--- xmalloc.c
|
--- xmalloc.c
|
||||||
+++ xmalloc.c 2010-02-15 15:36:40.113797875 +0000
|
+++ xmalloc.c 2010-02-24 08:32:51.452626384 +0000
|
||||||
@@ -35,6 +35,11 @@
|
@@ -35,6 +35,11 @@
|
||||||
# include "ansi_stdlib.h"
|
# include "ansi_stdlib.h"
|
||||||
#endif /* HAVE_STDLIB_H */
|
#endif /* HAVE_STDLIB_H */
|
||||||
@ -121,3 +121,27 @@
|
|||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
allocerr ("xrealloc", bytes);
|
allocerr ("xrealloc", bytes);
|
||||||
|
|
||||||
|
@@ -145,7 +204,22 @@ xfree (string)
|
||||||
|
PTR_T string;
|
||||||
|
{
|
||||||
|
if (string)
|
||||||
|
- free (string);
|
||||||
|
+ {
|
||||||
|
+ sigset_t set, oset;
|
||||||
|
+ int blocked_sigs = 0;
|
||||||
|
+
|
||||||
|
+ /* Block all signals in case we are executed from a signal handler. */
|
||||||
|
+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
|
||||||
|
+ {
|
||||||
|
+ block_signals (&set, &oset);
|
||||||
|
+ blocked_sigs = 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ free (string);
|
||||||
|
+
|
||||||
|
+ if (blocked_sigs)
|
||||||
|
+ unblock_signals (&set, &oset);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USING_BASH_MALLOC
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 24 09:55:03 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
- Avoid hang due malloc()/free() within signal handler (bnc#522351)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 18 11:05:13 CET 2010 - werner@suse.de
|
Thu Feb 18 11:05:13 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user