chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path-util: fix path_is_mount_point() for symlinks
[elogind.git]
/
src
/
core
/
socket.c
diff --git
a/src/core/socket.c
b/src/core/socket.c
index 88aae4815b30da05723d05c91a49e961d0706bfa..f67370b4cb921d0d041b7d5e7b4ed991af6a2db9 100644
(file)
--- a/
src/core/socket.c
+++ b/
src/core/socket.c
@@
-19,7
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
@@
-29,12
+28,9
@@
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <mqueue.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <mqueue.h>
-#include <sys/xattr.h>
#include "sd-event.h"
#include "log.h"
#include "sd-event.h"
#include "log.h"
-#include "load-dropin.h"
-#include "load-fragment.h"
#include "strv.h"
#include "mkdir.h"
#include "path-util.h"
#include "strv.h"
#include "mkdir.h"
#include "path-util.h"
@@
-1326,7
+1322,7
@@
static void socket_set_state(Socket *s, SocketState state) {
unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], true);
}
unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], true);
}
-static int socket_coldplug(Unit *u) {
+static int socket_coldplug(Unit *u
, Hashmap *deferred_work
) {
Socket *s = SOCKET(u);
int r;
Socket *s = SOCKET(u);
int r;
@@
-1396,7
+1392,11
@@
static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
assert(c);
assert(_pid);
assert(c);
assert(_pid);
- unit_realize_cgroup(UNIT(s));
+ (void) unit_realize_cgroup(UNIT(s));
+ if (s->reset_cpu_usage) {
+ (void) unit_reset_cpu_usage(UNIT(s));
+ s->reset_cpu_usage = false;
+ }
r = unit_setup_exec_runtime(UNIT(s));
if (r < 0)
r = unit_setup_exec_runtime(UNIT(s));
if (r < 0)
@@
-1952,6
+1952,8
@@
static int socket_start(Unit *u) {
assert(s->state == SOCKET_DEAD || s->state == SOCKET_FAILED);
s->result = SOCKET_SUCCESS;
assert(s->state == SOCKET_DEAD || s->state == SOCKET_FAILED);
s->result = SOCKET_SUCCESS;
+ s->reset_cpu_usage = true;
+
socket_enter_start_pre(s);
return 1;
socket_enter_start_pre(s);
return 1;