*/
#include <sys/resource.h>
-#include "busybox.h"
+#include "libbb.h"
+int nice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
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 */
- bb_perror_msg_and_die("%s", *argv);
+ bb_simple_perror_msg_and_die(*argv);
}