comparison dbutil.c @ 1461:fb90a5ba84e0

Merge pull request #49 from fperrad/20170812_lint Some linting, const parameters
author Matt Johnston <matt@ucc.asn.au>
date Thu, 25 Jan 2018 21:55:25 +0800
parents 336cae2238ca 58a74cb829b8
children b528e3753af4
comparison
equal deleted inserted replaced
1454:ef310db5ccec 1461:fb90a5ba84e0
239 /* Sets up a pipe for a, returning three non-blocking file descriptors 239 /* Sets up a pipe for a, returning three non-blocking file descriptors
240 * and the pid. exec_fn is the function that will actually execute the child process, 240 * and the pid. exec_fn is the function that will actually execute the child process,
241 * it will be run after the child has fork()ed, and is passed exec_data. 241 * it will be run after the child has fork()ed, and is passed exec_data.
242 * If ret_errfd == NULL then stderr will not be captured. 242 * If ret_errfd == NULL then stderr will not be captured.
243 * ret_pid can be passed as NULL to discard the pid. */ 243 * ret_pid can be passed as NULL to discard the pid. */
244 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, 244 int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
245 int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid) { 245 int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid) {
246 int infds[2]; 246 int infds[2];
247 int outfds[2]; 247 int outfds[2];
248 int errfds[2]; 248 int errfds[2];
249 pid_t pid; 249 pid_t pid;