[Lazarus] Status of GDB and Lazarus/FPC debugging threaded apps

David Emerson dle3ab at angelbase.com
Mon Jan 10 20:52:43 CET 2011


On Mon 10 Jan 2011, Joost van der Sluis wrote:
> On Mon, 2011-01-10 at 10:19 -0600, Andrew Brunner wrote:
> > On Mon, Jan 10, 2011 at 9:51 AM, Joost van der Sluis <joost at cnoc.nl> wrote:
> > > What happens if you kill Lazarus/gdb/your application when the desktop
> > > freezes? Do you really have to restart gdm?
> > 
> > Most of the times, nothing but ctrl+alt+f2 responds.  The entire
> > desktop goes into a halted state.  
> 
> Yes, but then you have a new terminal, in which you can kill your
> application/lazarus gdb. (try killall -9 gdb) That probably restores
> your desktop responsibility.

No no no.  Don't use kill -9.
It doesn't give the process a chance to cleanly:
1) shut down socket connections
2) clean up temp files
3) inform its children that it is going away
4) reset its terminal characteristics
and so on and so on and so on.

Generally, send 15, and wait a second or two, and if that doesn't
work, send 2, and if that doesn't work, send 1.

Don't use kill -9.  Don't bring out the combine harvester just to tidy
up the flower pot.

from http://partmaps.org/era/unix/award.html#uuk9letter


As for killall...

http://mywiki.wooledge.org/ProcessManagement#How_do_I_kill_a_process_by_name.3F__I_need_to_get_the_PID_out_of_ps_aux_.7C_grep_....
http://mywiki.wooledge.org/ProcessManagement#line-81


> > Other times the entire laptop hangs
> > and I have to hold the power button down.
> 
> Most often it is also possible to use ssh to connect to the machine and
> kill some processes.
> 
> Joost.
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 







More information about the Lazarus mailing list