[Qt-interest] Handling system signals
Scott Sibley
sisibley at gmail.com
Thu Oct 29 10:05:04 CET 2009
No, GDB doesn't catch ctrl-c. The program does, that's why it exits. GDB did
not stop the program. Trust me, without GDB, the program is crashing. And it
would be a poor design for GDB to take over signal handling, utterly
confusing the boundary between GDB and program. GDB should not handle any
signals the program is capable of handling, otherwise debugging the program
for signals is not possible.
On Thu, Oct 29, 2009 at 1:43 AM, Thiago Macieira <thiago at kde.org> wrote:
> Em Quinta-feira 29. Outubro 2009, às 03.43.09, Scott Sibley escreveu:
> > I'm trying to deal with SIGINT, so I can reboot the device I'm
> > communicating with when I hit ctrl-c during development. I get the
> > following stack trace after calling QApplication::exit() and freeing
> > memory. Is it that I'm forgetting to stop some timer? I've made an
> > assessment, but I didn't see where I might have.
>
> No. Nothing happened.
>
> Since you pressed Ctrl+C inside GDB, GDB caught it and stopped the program
> execution, dropping you back to the GDB command-line. But the program
> hasn't
> seen the SIGINT signal yet.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091029/397ec179/attachment.html
More information about the Qt-interest-old
mailing list