subdaemon: suppress overzealous _FORTIFY_SOURCE warning.

Ubuntu defines _FORTIFY_SOURCE when compiling with optimization.  This
insanity is the result.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-11-05 11:38:16 +10:30 committed by Christian Decker
parent ad1cf8b40c
commit c13a355cf2

View file

@ -43,7 +43,10 @@ void subdaemon_setup(int argc, char *argv[])
if (streq(argv[i], "--debugger")) { if (streq(argv[i], "--debugger")) {
char *cmd = tal_fmt(NULL, "${DEBUG_TERM:-gnome-terminal --} gdb -ex 'attach %u' %s &", getpid(), argv[0]); char *cmd = tal_fmt(NULL, "${DEBUG_TERM:-gnome-terminal --} gdb -ex 'attach %u' %s &", getpid(), argv[0]);
fprintf(stderr, "Running %s\n", cmd); fprintf(stderr, "Running %s\n", cmd);
system(cmd); /* warn_unused_result is fascist bullshit.
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 */
if (system(cmd))
;
/* Continue in the debugger. */ /* Continue in the debugger. */
kill(getpid(), SIGSTOP); kill(getpid(), SIGSTOP);
} }