chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] move assignments past local variables
[elogind.git]
/
udevd.c
diff --git
a/udevd.c
b/udevd.c
index 2bcb4a9e1ec4fd7d8b3cc525b4e8534d71274702..811f62243eb98473d6691624dadcb2dfe67b235e 100644
(file)
--- a/
udevd.c
+++ b/
udevd.c
@@
-35,6
+35,7
@@
#include <fcntl.h>
#include "klibc_fixups.h"
#include <sys/sysinfo.h>
#include <fcntl.h>
#include "klibc_fixups.h"
#include <sys/sysinfo.h>
+#include <sys/stat.h>
#include "list.h"
#include "udev.h"
#include "list.h"
#include "udev.h"
@@
-308,7
+309,7
@@
skip:
return;
}
return;
}
-
asmlinkage static void
sig_handler(int signum)
+
static void asmlinkage
sig_handler(int signum)
{
int rc;
{
int rc;
@@
-457,7
+458,7
@@
int main(int argc, char *argv[])
/* set signal handlers */
/* set signal handlers */
- act.sa_handler = sig_handler;
+ act.sa_handler =
(void (*) (int))
sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
@@
-477,6
+478,8
@@
int main(int argc, char *argv[])
exit(1);
}
exit(1);
}
+ set_cloexec_flag(ssock, 1);
+
/* the bind takes care of ensuring only one copy running */
retval = bind(ssock, (struct sockaddr *) &saddr, addrlen);
if (retval < 0) {
/* the bind takes care of ensuring only one copy running */
retval = bind(ssock, (struct sockaddr *) &saddr, addrlen);
if (retval < 0) {