#include <sys/resource.h>
#include "busybox.h"
+int nice_main(int argc, char **argv);
int nice_main(int argc, char **argv)
{
int old_priority, adjustment;
old_priority = getpriority(PRIO_PROCESS, 0);
if (!*++argv) { /* No args, so (GNU) output current nice value. */
- bb_printf("%d\n", old_priority);
- bb_fflush_stdout_and_exit(EXIT_SUCCESS);
+ printf("%d\n", old_priority);
+ fflush_stdout_and_exit(EXIT_SUCCESS);
}
adjustment = 10; /* Set default adjustment. */
}
}
- execvp(*argv, argv); /* Now exec the desired program. */
+ BB_EXECVP(*argv, argv); /* Now exec the desired program. */
/* The exec failed... */
xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */