[systemd-devel] Why does nspawn check if in a user session?

2017-09-13 Thread Luke Shumaker
membership as a sloppy proxy for that. If that's the case, wouldn't it be more correct and robust to check for other processes in "/sys/fs/cgroup/.../cgroup.procs"? -- Happy hacking, ~ Luke Shumaker ___ systemd-devel mailing list sys

[systemd-devel] Why does nspawn need two child processes?

2017-05-31 Thread Luke Shumaker
he mount namespace, but *before* unsharing the PID namespace? -- Happy hacking, ~ Luke Shumaker ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] time-sync.target

2017-05-31 Thread Luke Shumaker
at libsystemd's sd_pid_notify_with_fds(). If you're writing C anyway, it may be easier to patch systemd-timesyncd to send the additional message when it sends the "STATUS=Syncronized..." message, rather than wrapping it. -- Happy hacking, ~ Luke Shumaker __

Re: [systemd-devel] time-sync.target

2017-05-30 Thread Luke Shumaker
erm it would be preferable to patch timesyncd, instead of having to install separate wrapper to fix the behavior. But for today, it works. -- Happy hacking, ~ Luke Shumaker ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Using systemd --user to manage graphical sessions?

2016-05-11 Thread Luke Shumaker
th a fake screen via `vncserver` (of course, managed as a systemd user unit :-) ). The only problem I have with this setup is that dunst (my desktop notification daemon) isn't happy running multiple instances on different displays. I think it's becaus

[systemd-devel] [PATCHv2] cg_path_get_user_unit(): Did not correctly parse user-unit templates.

2015-02-03 Thread Luke Shumaker
It ran either skip_session() or skip_user_manager(), then ran skip_slices() iff skip_session() ran. It needs to run skip_slices() in either case. Included is a test case demonstrating why. --- src/shared/cgroup-util.c| 18 -- src/test/test-cgroup-util.c | 1 + 2 files change

Re: [systemd-devel] [PATCH] cg_path_get_user_unit(): Did not correctly parse user-unit templates.

2015-02-03 Thread Luke Shumaker
hat it showed the intent better. Though it may be that it's similar to a Ruby idiom, and I've been working with some Ruby recently. -- Happy hacking, ~ Luke Shumaker ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] cg_path_get_user_unit(): Did not correctly parse user-unit templates.

2015-02-03 Thread Luke Shumaker
It ran either skip_session() or skip_user_manager(), then ran skip_slices() iff skip_session() ran. It needs to run skip_slices() in either case. Included is a test case demonstrating why. --- src/shared/cgroup-util.c| 19 --- src/test/test-cgroup-util.c | 1 + 2 files chang

[systemd-devel] [PATCH v2 2/3] nspawn: Fix regression with exit status

2014-06-29 Thread Luke Shumaker
Commit 113cea8 introduced a bug that caused the exit code of systemd-nspawn to not reflect the exit code of the program executed in the container. --- src/nspawn/nspawn.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nsp

[systemd-devel] [PATCH v2 3/3] nspawn: log a warning on failure from wait_for_terminate()

2014-06-29 Thread Luke Shumaker
This is at the suggestion of Djalal Harouni on the mailing list, and reflects the behavior of shared/util.c:wait_for_terminate_and_warn(). --- src/nspawn/nspawn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index be0e6b5..8fb72d6

[systemd-devel] [PATCH v2 1/3] shared/util.c:wait_for_terminate_and_warn(): Add a comment on the return values

2014-06-29 Thread Luke Shumaker
--- src/shared/util.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/shared/util.c b/src/shared/util.c index e7ff0f8..32358e5 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -3474,6 +3474,17 @@ int wait_for_terminate(pid_t pid, siginfo_t *status) { } } +

Re: [systemd-devel] [PATCH] nspawn: When exiting with an error, make the error code meaningful.

2014-06-29 Thread Luke Shumaker
At Sun, 29 Jun 2014 12:31:13 +0100, Djalal Harouni wrote: > On Sat, Jun 28, 2014 at 12:09:56PM -0400, Luke Shumaker wrote: > > This is accomplished by having wait_for_container() return a positive error > > code when we would like that error code to make its way to the user. This

[systemd-devel] [PATCH] nspawn: When exiting with an error, make the error code meaningful.

2014-06-28 Thread Luke Shumaker
This is accomplished by having wait_for_container() return a positive error code when we would like that error code to make its way to the user. This is at odds with the CODING_STYLE rule that error codes should be returned as negative values. --- src/nspawn/nspawn.c | 21 + 1

[systemd-devel] [PATCH] nspawn: When exiting with an error, make the error code meaningful.

2014-06-28 Thread Luke Shumaker
This is accomplished by having the return value of wait_for_container be interpreted as a negative version of the exit status code. --- src/nspawn/nspawn.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 0a8dc0c..0c89

[systemd-devel] nspawn: When exiting with an error, make the exit code meaningful.

2014-06-28 Thread Luke Shumaker
These two patches both do the same thing, in slightly different ways. They fix a regression intruduced in commit 113cea8 (present in v213 and 214) where the exit status of nspawn does not reflect the exit status of the containered process. Happy hacking, ~ Luke Shumaker

[systemd-devel] [PATCH 2/2] ptyfwd: Don't set the output prop of stdin, nor the input props of stdout.

2013-11-23 Thread Luke Shumaker
It was calling cfmakeraw(3) on the properties for STDIN_FILENO; cfmakeraw sets both input and output properties. If (and only if) stdin and stdout are the same device is this correct. Otherwise, we must change only the input properties of stdin, and only the output properties of stdout. --- src/

[systemd-devel] [PATCH 1/2] ptyfwd: Set the size of the PTY base on the size of stdout, not stdin.

2013-11-23 Thread Luke Shumaker
--- src/shared/ptyfwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c index 7225b93..85a0ddc 100644 --- a/src/shared/ptyfwd.c +++ b/src/shared/ptyfwd.c @@ -305,7 +305,7 @@ static int process_pty_loop(int master, sigset_t *mask, p

[systemd-devel] nspawn (ptyfwd): Correctly handle output redirection

2013-11-23 Thread Luke Shumaker
please? Sorry it took so long, I've been unable to devote much time to this. Happy hacking, ~ Luke Shumaker ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel