summaryrefslogtreecommitdiffstats
path: root/test/lib/test-process-noargs.c
blob: 02bdc589e318c079eeffc3f6e747999a33a44e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include <process/process.h>
#include <waiter/waiter.h>
#include <talloc/talloc.h>

int main(void)
{
	struct waitset *waitset;
	int result;
	void *ctx;

	ctx = talloc_new(NULL);

	waitset = waitset_create(ctx);

	process_init(ctx, waitset);

	result = process_run_simple(ctx, "true", NULL);

	assert(WIFEXITED(result));
	assert(WEXITSTATUS(result) == 0);

	talloc_free(ctx);

	return EXIT_SUCCESS;
}
OpenPOWER on IntegriCloud