Compare commits
5 Commits
cee33a7ab3
...
437f48a471
Author | SHA1 | Date |
---|---|---|
Lennart Poettering | 437f48a471 | |
Zbigniew Jędrzejewski-Szmek | d5fc5b2f8d | |
Zbigniew Jędrzejewski-Szmek | 7b631898ef | |
Martin Wilck | 7b6596d748 | |
Martin Wilck | bfde9421af |
11
NEWS
11
NEWS
|
@ -2,6 +2,17 @@ systemd System and Service Manager
|
|||
|
||||
CHANGES WITH 244 in spe:
|
||||
|
||||
* systemd-udevd: removed the 30s timeout for killing stale workers on
|
||||
exit. systemd-udevd now waits for workers to finish. The hard-coded
|
||||
exit timeout of 30s was too short for some large installations, where
|
||||
driver initialization could be prematurely interrupted during initrd
|
||||
processing if the root file system had been mounted and init was
|
||||
preparing to switch root. If udevd is run without systemd and workers
|
||||
are hanging while udevd receives an exit signal, udevd will now exit
|
||||
when udev.event_timeout is reached for the last hanging worker. With
|
||||
systemd, the exit timeout can additionally be configured using
|
||||
TimeoutStopSec= in systemd-udevd.service.
|
||||
|
||||
* Support for the cpuset cgroups v2 controller has been added.
|
||||
Processes may be restricted to specific CPUs using the new
|
||||
AllowedCPUs= setting, and to specific memory NUMA nodes using the new
|
||||
|
|
|
@ -136,9 +136,8 @@
|
|||
evaluated relative to the UNIX time epoch 1st Jan, 1970,
|
||||
00:00.</para>
|
||||
|
||||
<para>Examples for valid timestamps and their normalized form
|
||||
(assuming the current time was 2012-11-23 18:15:22 and the timezone
|
||||
was UTC+8, for example TZ=Asia/Shanghai):</para>
|
||||
<para>Examples for valid timestamps and their normalized form (assuming the current time was 2012-11-23
|
||||
18:15:22 and the timezone was UTC+8, for example <literal>TZ=:Asia/Shanghai</literal>):</para>
|
||||
|
||||
<programlisting> Fri 2012-11-23 11:12:13 → Fri 2012-11-23 11:12:13
|
||||
2012-11-23 11:12:13 → Fri 2012-11-23 11:12:13
|
||||
|
|
|
@ -832,8 +832,12 @@ int parse_timestamp(const char *t, usec_t *usec) {
|
|||
}
|
||||
if (r == 0) {
|
||||
bool with_tz = true;
|
||||
char *colon_tz;
|
||||
|
||||
if (setenv("TZ", tz, 1) != 0) {
|
||||
/* tzset(3) says $TZ should be prefixed with ":" if we reference timezone files */
|
||||
colon_tz = strjoina(":", tz);
|
||||
|
||||
if (setenv("TZ", colon_tz, 1) != 0) {
|
||||
shared->return_value = negative_errno();
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -437,14 +437,9 @@ static int detect_unified_cgroup_hierarchy_from_environment(void) {
|
|||
|
||||
e = getenv(var);
|
||||
if (!e) {
|
||||
static bool warned = false;
|
||||
|
||||
/* $UNIFIED_CGROUP_HIERARCHY has been renamed to $SYSTEMD_NSPAWN_UNIFIED_HIERARCHY. */
|
||||
var = "UNIFIED_CGROUP_HIERARCHY";
|
||||
e = getenv(var);
|
||||
if (e && !warned) {
|
||||
log_info("$UNIFIED_CGROUP_HIERARCHY has been renamed to $SYSTEMD_NSPAWN_UNIFIED_HIERARCHY.");
|
||||
warned = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isempty(e)) {
|
||||
|
|
|
@ -1352,7 +1352,12 @@ int calendar_spec_next_usec(const CalendarSpec *spec, usec_t usec, usec_t *ret_n
|
|||
return r;
|
||||
}
|
||||
if (r == 0) {
|
||||
if (setenv("TZ", spec->timezone, 1) != 0) {
|
||||
char *colon_tz;
|
||||
|
||||
/* tzset(3) says $TZ should be prefixed with ":" if we reference timezone files */
|
||||
colon_tz = strjoina(":", spec->timezone);
|
||||
|
||||
if (setenv("TZ", colon_tz, 1) != 0) {
|
||||
shared->return_value = negative_errno();
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -43,9 +43,12 @@ static void test_next(const char *input, const char *new_tz, usec_t after, usec_
|
|||
if (old_tz)
|
||||
old_tz = strdupa(old_tz);
|
||||
|
||||
if (new_tz)
|
||||
assert_se(setenv("TZ", new_tz, 1) >= 0);
|
||||
else
|
||||
if (new_tz) {
|
||||
char *colon_tz;
|
||||
|
||||
colon_tz = strjoina(":", new_tz);
|
||||
assert_se(setenv("TZ", colon_tz, 1) >= 0);
|
||||
} else
|
||||
assert_se(unsetenv("TZ") >= 0);
|
||||
tzset();
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ static void test_in_utc_timezone(void) {
|
|||
assert_se(timezone == 0);
|
||||
assert_se(daylight == 0);
|
||||
|
||||
assert_se(setenv("TZ", "Europe/Berlin", 1) >= 0);
|
||||
assert_se(setenv("TZ", ":Europe/Berlin", 1) >= 0);
|
||||
assert_se(!in_utc_timezone());
|
||||
assert_se(streq(tzname[0], "CET"));
|
||||
assert_se(streq(tzname[1], "CEST"));
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct StatusInfo {
|
|||
} StatusInfo;
|
||||
|
||||
static void print_status_info(const StatusInfo *i) {
|
||||
const char *old_tz = NULL, *tz;
|
||||
const char *old_tz = NULL, *tz, *tz_colon;
|
||||
bool have_time = false;
|
||||
char a[LINE_MAX];
|
||||
struct tm tm;
|
||||
|
@ -62,7 +62,8 @@ static void print_status_info(const StatusInfo *i) {
|
|||
old_tz = strdupa(tz);
|
||||
|
||||
/* Set the new $TZ */
|
||||
if (setenv("TZ", isempty(i->timezone) ? "UTC" : i->timezone, true) < 0)
|
||||
tz_colon = strjoina(":", isempty(i->timezone) ? "UTC" : i->timezone);
|
||||
if (setenv("TZ", tz_colon, true) < 0)
|
||||
log_warning_errno(errno, "Failed to set TZ environment variable, ignoring: %m");
|
||||
else
|
||||
tzset();
|
||||
|
|
|
@ -293,6 +293,8 @@ static void manager_free(Manager *manager) {
|
|||
if (!manager)
|
||||
return;
|
||||
|
||||
manager->monitor = sd_device_monitor_unref(manager->monitor);
|
||||
|
||||
udev_builtin_exit();
|
||||
|
||||
if (manager->pid == getpid_cached())
|
||||
|
@ -774,21 +776,7 @@ set_delaying_seqnum:
|
|||
return true;
|
||||
}
|
||||
|
||||
static int on_exit_timeout(sd_event_source *s, uint64_t usec, void *userdata) {
|
||||
Manager *manager = userdata;
|
||||
|
||||
assert(manager);
|
||||
|
||||
log_error("Giving up waiting for workers to finish.");
|
||||
sd_event_exit(manager->event, -ETIMEDOUT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void manager_exit(Manager *manager) {
|
||||
uint64_t usec;
|
||||
int r;
|
||||
|
||||
assert(manager);
|
||||
|
||||
manager->exit = true;
|
||||
|
@ -803,18 +791,9 @@ static void manager_exit(Manager *manager) {
|
|||
manager->inotify_event = sd_event_source_unref(manager->inotify_event);
|
||||
manager->fd_inotify = safe_close(manager->fd_inotify);
|
||||
|
||||
manager->monitor = sd_device_monitor_unref(manager->monitor);
|
||||
|
||||
/* discard queued events and kill workers */
|
||||
event_queue_cleanup(manager, EVENT_QUEUED);
|
||||
manager_kill_workers(manager);
|
||||
|
||||
assert_se(sd_event_now(manager->event, CLOCK_MONOTONIC, &usec) >= 0);
|
||||
|
||||
r = sd_event_add_time(manager->event, NULL, CLOCK_MONOTONIC,
|
||||
usec + 30 * USEC_PER_SEC, USEC_PER_SEC, on_exit_timeout, manager);
|
||||
if (r < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
/* reload requested, HUP signal received, rules changed, builtin changed */
|
||||
|
|
Loading…
Reference in New Issue