bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core dump in torture test


From: Lucas Gonze
Subject: Re: core dump in torture test
Date: Sat, 19 Oct 2002 16:50:28 -0400 (EDT)

> Reading quickly, it seems your sigwinch handler is calling code that
> can break things (malloc and stdio stuff).  There's not much you can
> do in a signal handler if you're planning to come back to the interrupted
> program, other than set variables to tell that an interrupt occurred.

In this case it depends on whether the crash is related to reentrant code
or to repeated creation and deletion of windows.  If it's about reentrant
code, then it's not as much of a bug.  If it's about lots of creation and
deletion, it's a bug.

But also, sigwinch is not your ordinary signal.  It has a special status
in windowing programs.  

Window resizes are an event oriented thing, so it's not really appropriate
to restrict the handler to setting a flag which is checked elsewhere.  My
application code is a shell -- it shouldn't be having to think about
anything but processes and pipes.  The alternative to a signal handler is
to have a redraw thread checking the flag, and having to bring in threads
to accomplish something so basic and universal seems like overkill.

- Lucas







reply via email to

[Prev in Thread] Current Thread [Next in Thread]