[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unsafe signal handler
From: |
Chet Ramey |
Subject: |
Re: unsafe signal handler |
Date: |
Mon, 18 Jul 2005 11:48:22 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Macintosh/20050317) |
Tim Waugh wrote:
> The signal handler termination_unwind_protect() can call
> maybe_save_shell_history() -> append_history() -> history_do_write()
> -> history_filename() -> xmalloc() -> malloc()
>
> and malloc() is not safe to call from a signal handler. This affects
> bash-2.05b as well as bash-3.0.
While this is true in general, the bash malloc is safe. I will see
what can be done in the general case, however.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU address@hidden http://tiswww.tis.case.edu/~chet/