#7 Make avarice when started inside a gdb session immune to SIGINT

open
nobody
None
5
2015-05-28
2013-02-26
nichtleiter
No

Currently, if avarice is started by means of the shell command within a gdb session you can't stop the uC with Ctrl-C without killing avarice. And thus closing the connection to the remote target.

At least for my workflow it would make debugging a lot easier when avarice ignores SIGINT if started in detached mode.

Unfortunately it seems to be harder than simply put

signal(SIGINT, SIG_IGN);

into the if(detach) condition inside main().

It would be so kind if somebody put some effort into this or rather give a hint how to achieve this.

With best regards

Discussion

  • Günther Jehle

    Günther Jehle - 2015-05-28

    Are there any solutions yet? ice-gdb is relies on calling avarice in detached mode - so every ctrl+c doesn't only stop gdb it also stops avarice what is quiet annoying.

    I tried to trap SIGINT in start-avarice script or start via "nohup" but was not sucessful

     
  • Günther Jehle

    Günther Jehle - 2015-05-28

    Solved it somehow: the problem is the common parent process (don't ask me why...). When you start avarice in a screen session it's working fine.

    Change last line in /usr/bin/start-avarice to:
    screen -dm avarice $AVARICE_ARGS localhost:6423

     

Log in to post a comment.