Fix 'dist' target in Makefile
[notion/jeffpc.git] / utils / ion-statusd / exec.c
bloba33d914879c95c2756506e71583ef57dc6c72ae0
1 /*
2 * ion/utils/ion-statusd/exec.c
4 * Copyright (c) Tuomo Valkonen 2005-2009.
6 * See the included file LICENSE for details.
7 */
10 #include <libmainloop/select.h>
11 #include <libmainloop/exec.h>
14 /*EXTL_DOC
15 * Run \var{cmd} in the background.
17 EXTL_SAFE
18 EXTL_EXPORT
19 int statusd_exec(const char *cmd)
21 return mainloop_spawn(cmd);
25 /*EXTL_DOC
26 * Run \var{cmd} with a read pipe connected to its stdout.
27 * When data is received through the pipe, \var{h} is called
28 * with that data.
30 EXTL_SAFE
31 EXTL_EXPORT
32 int statusd_popen_bgread(const char *cmd, ExtlFn h, ExtlFn errh)
34 return mainloop_popen_bgread(cmd, NULL, NULL, h, errh);