diff --git a/src/common/execio.c b/src/common/execio.c --- a/src/common/execio.c +++ b/src/common/execio.c @@ -32,7 +32,7 @@ #include #include -int execio_open(struct execio **rem, const char *progname, char *const argv[]) +int execio_open(struct execio **rem, const char *progname, char *const argv[], int nice_incr) { /* pipe used to write to child */ int pipe_write[2]; @@ -99,6 +99,11 @@ int execio_open(struct execio **rem, con /* child */ else { +#ifdef HAVE_NICE + /* lower the nice value */ + nice(nice_incr); +#endif + /* close unused pipes */ close(pipe_write[1]); close(pipe_read[0]); @@ -162,7 +167,7 @@ int _execio_checkpid(struct execio *eio) } -int execio_read(struct execio *eio, const void *buf, size_t len, size_t *bytesread) +int execio_read(struct execio *eio, void *buf, size_t len, size_t *bytesread) { ssize_t ret; /*