summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /daemons
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating errors much easier.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/Makefile2
-rw-r--r--daemons/runttys.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/daemons/Makefile b/daemons/Makefile
index 289fbf63..6d030717 100644
--- a/daemons/Makefile
+++ b/daemons/Makefile
@@ -41,7 +41,7 @@ mail.local: lmail.o ../libshouldbeinlibc/libshouldbeinlibc.a
console-run: console-run.o ../libfshelp/libfshelp.a ../libports/libports.a \
../libihash/libihash.a ../libshouldbeinlibc/libshouldbeinlibc.a
-runttys: runttys.o
+runttys: runttys.o ../libshouldbeinlibc/libshouldbeinlibc.a
runttys-LDLIBS = -lutil
runsystem: runsystem.sh
diff --git a/daemons/runttys.c b/daemons/runttys.c
index 7efb7b7a..baefdbef 100644
--- a/daemons/runttys.c
+++ b/daemons/runttys.c
@@ -17,7 +17,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <argz.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <errno.h>
#include <error.h>
#include <fcntl.h>
@@ -239,8 +239,8 @@ static int
startup_terminal (struct terminal *t)
{
pid_t pid;
- assert (t->on);
- assert (t->getty_argv);
+ assert_backtrace (t->on);
+ assert_backtrace (t->getty_argv);
if (t->window_argv)
{
@@ -494,7 +494,7 @@ main ()
error (1, waiterr, "waitpid");
}
- assert (pid > 0);
+ assert_backtrace (pid > 0);
/* We have reaped a dead child. Restart that tty line. */
restart_terminal (pid);