gid_t util_lookup_group(struct udev *udev, const char *group);
int util_run_program(struct udev *udev, const char *command, char **envp,
char *result, size_t ressize, size_t *reslen,
- const sigset_t *sigmask, bool reset_prio);
+ const sigset_t *sigmask);
int util_resolve_subsys_kernel(struct udev *udev, const char *string,
char *result, size_t maxsize, int read_value);
unsigned long long usec_monotonic(void);
int util_run_program(struct udev *udev, const char *command, char **envp,
char *result, size_t ressize, size_t *reslen,
- const sigset_t *sigmask, bool reset_prio)
+ const sigset_t *sigmask)
{
int status;
int outpipe[2] = {-1, -1};
if (sigmask)
sigprocmask(SIG_SETMASK, sigmask, NULL);
- if (reset_prio)
- setpriority(PRIO_PROCESS, 0, 0);
execve(argv[0], argv, envp);
if (errno == ENOENT || errno == ENOTDIR) {
info(event->udev, "delay execution of '%s'\n", program);
sleep(event->exec_delay);
}
- if (util_run_program(event->udev, program, envp, NULL, 0, NULL, sigmask, true) != 0) {
+ if (util_run_program(event->udev, program, envp, NULL, 0, NULL, sigmask) != 0) {
if (udev_list_entry_get_flags(list_entry))
err = -1;
}
char *line;
envp = udev_device_get_properties_envp(dev);
- if (util_run_program(udev, program, envp, result, sizeof(result), &reslen, NULL, false) != 0)
+ if (util_run_program(udev, program, envp, result, sizeof(result), &reslen, NULL) != 0)
return -1;
line = result;
program,
&rules->buf[rule->rule.filename_off],
rule->rule.filename_line);
- if (util_run_program(event->udev, program, envp, result, sizeof(result), NULL, NULL, false) != 0) {
+ if (util_run_program(event->udev, program, envp, result, sizeof(result), NULL, NULL) != 0) {
if (cur->key.op != OP_NOMATCH)
goto nomatch;
} else {
#include "udev.h"
#include "sd-daemon.h"
-#define UDEVD_PRIORITY -4
-#define UDEV_PRIORITY -2
-
static bool debug;
static void log_fn(struct udev *udev, int priority,
close(worker_watch[READ_END]);
udev_log_close();
udev_log_init("udevd-work");
- setpriority(PRIO_PROCESS, 0, UDEV_PRIORITY);
/* set signal handlers */
memset(&act, 0x00, sizeof(act));
if (fd > STDERR_FILENO)
close(fd);
- /* set scheduling priority for the main daemon process */
- setpriority(PRIO_PROCESS, 0, UDEVD_PRIORITY);
-
setsid();
f = fopen("/dev/kmsg", "w");