nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] restore terminal and print backtrace for segfau


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] restore terminal and print backtrace for segfaults and assertions
Date: Mon, 15 Jan 2018 03:48:50 -0700

On Mon, 15 Jan 2018 04:26:23 -0500
Mike Frysinger <address@hidden> wrote:

> error messages should be sent to stderr, not stdout
> static
> 
> > +   endwin();
> > +   tcsetattr(0, TCSANOW, &oldterm);
> 
> it isn't safe to call printf or any other FILE based functions from a
> signal handler.  you have to use write or other async funcs directly.

Attached file fixes those issues but endwin() and tcsetattr() might also be 
unsafe...


> shouldn't clobber the standard assert macro ...

No clobbering, I removed assert.h :)

Attachment: restore-terminal-for-segfaults-and-assertions.patch
Description: Text Data


reply via email to

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