From 2648a0e1c4f4f2a6f975895bce639a37ed48e065 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 7 Sep 2019 14:30:32 +0100 Subject: Replace the gdbargs file with the --eval-command flag. --- make/template/inspircd | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'make/template/inspircd') diff --git a/make/template/inspircd b/make/template/inspircd index d0978ee29..4f352ddaf 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -59,6 +59,13 @@ my $executable = "inspircd"; my $version = "@VERSION_FULL@"; my $uid = "@UID@"; +my @gdbargs = ( + '--eval-command', 'handle SIGPIPE pass nostop noprint', + '--eval-command', 'handle SIGHUP pass nostop noprint', + '--eval-command', 'run', + '--args', "$binpath/$executable", qw(--nofork --nolog --debug) +); + sub expand_fragment($$) { my ($base, $fragment) = @_; if ($fragment =~ /^\//) { @@ -213,7 +220,7 @@ sub dev_debug(@) checkgdb(); # If we are still alive here.. Try starting the IRCd.. - exec 'gdb', "--command=$scriptpath/.gdbargs", '--args', "$binpath/$executable", qw(--nofork --debug), @_; + exec 'gdb', @gdbargs, @_; die "Failed to start GDB: $!\n"; } @@ -232,7 +239,7 @@ sub dev_screendebug(@) # If we are still alive here.. Try starting the IRCd.. print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the gdb output and get a backtrace.\n"; print "Once you're inside the screen session press ^C + d to re-detach from the session\n"; - exec qw(screen -m -d gdb), "--command=$scriptpath/.gdbargs", '-args', "$binpath/$executable", qw(--nofork --debug --nolog), @_; + exec qw(screen -m -d gdb), @gdbargs, @_; die "Failed to start screen: $!\n"; } -- cgit v1.2.3