Accepting request 33340 from Base:System

checked in (request 33340)

OBS-URL: https://build.opensuse.org/request/show/33340
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=26
This commit is contained in:
OBS User autobuild 2010-02-25 10:11:41 +00:00 committed by Git OBS Bridge
parent 7b7d083237
commit a72da9301f
2 changed files with 1 additions and 30 deletions

View File

@ -15,7 +15,7 @@
#if 0
--- xmalloc.c
+++ xmalloc.c 2010-02-24 08:32:51.452626384 +0000
+++ xmalloc.c 2010-02-15 15:36:40.113797875 +0000
@@ -35,6 +35,11 @@
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
@ -121,27 +121,3 @@
if (temp == 0)
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

View File

@ -1,8 +1,3 @@
-------------------------------------------------------------------
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