summaryrefslogtreecommitdiff
path: root/lib/tdb/test/external-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb/test/external-agent.c')
-rw-r--r--lib/tdb/test/external-agent.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tdb/test/external-agent.c b/lib/tdb/test/external-agent.c
index 139de76f9a..8140e70ead 100644
--- a/lib/tdb/test/external-agent.c
+++ b/lib/tdb/test/external-agent.c
@@ -108,12 +108,16 @@ struct agent *prepare_external_agent(void)
int command[2], response[2];
char name[1+PATH_MAX];
- if (pipe(command) != 0 || pipe(response) != 0)
- return NULL;
+ if (pipe(command) != 0 || pipe(response) != 0) {
+ fprintf(stderr, "pipe failed: %s\n", strerror(errno));
+ exit(1);
+ }
pid = fork();
- if (pid < 0)
- return NULL;
+ if (pid < 0) {
+ fprintf(stderr, "fork failed: %s\n", strerror(errno));
+ exit(1);
+ }
if (pid != 0) {
struct agent *agent = malloc(sizeof(*agent));