aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-21 23:09:05 +0200
committerMattias Andrée <maandree@kth.se>2017-10-21 23:09:05 +0200
commitc371f69e2c8bdd249c94635db459361d90d8bd1b (patch)
tree51b8b9cea75f47a4cf3f181871d3956ab9c09d27
parentAdd test and fix bugs (diff)
downloadsbus-c371f69e2c8bdd249c94635db459361d90d8bd1b.tar.gz
sbus-c371f69e2c8bdd249c94635db459361d90d8bd1b.tar.bz2
sbus-c371f69e2c8bdd249c94635db459361d90d8bd1b.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.c b/test.c
index a233761..62113d9 100644
--- a/test.c
+++ b/test.c
@@ -20,7 +20,7 @@ static pid_t pid;
#define assert(e)\
(errno = 0, (e) ? 0 :\
(fprintf(stderr, "FAILURE: %s; errno=%s; line=%i\n",\
- #e, strerror(errno), __LINE__), exit(1), 0))
+ #e, strerror(errno), __LINE__), exit(1), 0))
static void
touch(const char *path)
@@ -337,8 +337,8 @@ main(void)
touch(".test.sock");
assert((pid = fork()) != -1);
+ alarm(1);
if (!pid) {
- alarm(1);
pdeath();
fd = open("/dev/null", O_WRONLY);
if (fd >= 0 && fd != STDERR_FILENO)