Re: [systemd-devel] [PATCH] main: fix error message if PR_SET_CHILD_REAPER is not available

2012-08-16 Thread shawn
On Thu, 2012-08-16 at 18:38 +0200, Marius Tolzmann wrote: > --- > src/core/main.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/core/main.c b/src/core/main.c > index cdd77c1..8973637 100644 > --- a/src/core/main.c > +++ b/src/core/main.c > @@ -1511,8 +1511,

Re: [systemd-devel] [PATCH] main: fix error message if PR_SET_CHILD_REAPER is not available

2012-08-16 Thread shawn
On Thu, 2012-08-16 at 18:38 +0200, Marius Tolzmann wrote: > --- > src/core/main.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/core/main.c b/src/core/main.c > index cdd77c1..8973637 100644 > --- a/src/core/main.c > +++ b/src/core/main.c > @@ -1511,8 +1511,

Re: [systemd-devel] [PATCH] Fix error message if PR_SET_CHILD_REAPER is not available

2012-08-16 Thread shawn
On Thu, 2012-08-16 at 18:38 +0200, Marius Tolzmann wrote: > Hi, > > I just hit some possible wrong error messages. Since prctl() is a > system call it won't return -errno but just -1 and set errno to some value. > > The attached patch should fix those error messages, if, for example, > PR_SET_

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 16:27, Robin Becker ([email protected]) wrote: > However, I'm a bit lost on what's the correct way for a user program > to signal that it wants to shut down etc. Slim appears to be running > polkit/consolekit so presumably I can use that, but is there a > preferred systemd appro

[systemd-devel] [PATCH v2] core: avoid needless strdup by working with strings directly

2012-08-16 Thread Shawn Landden
config_parse_join_controllers() not converted cause that is a const char * --- src/core/main.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index cdd77c1..528cfec 100644 --- a/src/core/main.c +++ b/

[systemd-devel] [PATCH] core: avoid needless strdup by working with strings directly

2012-08-16 Thread Shawn Landden
--- src/core/main.c | 52 ++-- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index cdd77c1..4e12793 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -237,7 +237,7 @@ static int set_default_un

Re: [systemd-devel] [PATCH] core: avoid needless strdup by working with strings directly

2012-08-16 Thread shawn
On Thu, 2012-08-16 at 11:58 +0100, Colin Guthrie wrote: > 'Twas brillig, and Shawn Landden at 16/08/12 02:13 did gyre and gimble: > > --- > > src/core/main.c | 51 ++- > > 1 file changed, 22 insertions(+), 29 deletions(-) > > > > diff --git a/src

[systemd-devel] [PATCH] main: fix error message if PR_SET_CHILD_REAPER is not available

2012-08-16 Thread Marius Tolzmann
--- src/core/main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index cdd77c1..8973637 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1511,8 +1511,8 @@ int main(int argc, char *argv[]) { /* Become reaper of

[systemd-devel] [PATCH] Fix error message if PR_SET_CHILD_REAPER is not available

2012-08-16 Thread Marius Tolzmann
Hi, I just hit some possible wrong error messages. Since prctl() is a system call it won't return -errno but just -1 and set errno to some value. The attached patch should fix those error messages, if, for example, PR_SET_CHILD_REAPER is not yet implemented due to an older kernel. BTW the REQ

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
I don't get this. This "oblogout" thing is a graphical tool you spawn from the system level? Does that mean it runs privileged but accesses your unprivileged X session? That sounds wrong... If you have a graphical session then the graphical session should handle the power/sleep key

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 13:16, Robin Becker ([email protected]) wrote: > On 16/08/2012 12:47, Mantas Mikulėnas wrote: > >On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > > > > >It'd be a bit better if the button/lid events were handled by a > >program running inside the Openbox session

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 14:47, Mantas Mikulėnas ([email protected]) wrote: > On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > > However, on my netbooks I like to use the power button to launch oblogout > > which brings up a bunch of buttons that allow me to > > logout/suspend/restart/halt etc etc.

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 12:23, Robin Becker ([email protected]) wrote: > Hi, > > I liked the idea of systemd when I first saw it, but after doing a > few conversions I have some small issues. I run arch linux with slim > & openbox and that seems to be fully supported so far as I can tell. > > However

Re: [systemd-devel] Newbie systemd-related question - how to run a service w/o anything but network?

2012-08-16 Thread Mike Kazantsev
On Thu, 16 Aug 2012 15:33:29 +0300 Ciprian Dorin Craciun wrote: > On Thu, Jul 26, 2012 at 1:09 PM, Peter Lemenkov wrote: > > Hello All. > > I'm trying to write a systemd service for epmd (Erlang Port Mapper > > Daemon, if someone is curious). its only purpose is to open a TCP port > > 4369 at 0.

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
... Openbox is actually running as a user process so it has no greater rights than the user; that makes the use of a more capable daemon a bit more reasonable. No, if your action just runs `oblogout` (and possibly `systemctl suspend`), then the capabilities of a normal user are sufficient

Re: [systemd-devel] Newbie systemd-related question - how to run a service w/o anything but network?

2012-08-16 Thread Ciprian Dorin Craciun
On Thu, Jul 26, 2012 at 1:09 PM, Peter Lemenkov wrote: > Hello All. > I'm trying to write a systemd service for epmd (Erlang Port Mapper > Daemon, if someone is curious). its only purpose is to open a TCP port > 4369 at 0.0.0.0 and act as a simple messaging (very simple actually) > bus between erl

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
On 16/08/2012 12:47, Mantas Mikulėnas wrote: On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: It'd be a bit better if the button/lid events were handled by a program running inside the Openbox session (the events can be read from /run/acpid.socket). I'm not exactly sure here, bu

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Mantas Mikulėnas
On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > However, on my netbooks I like to use the power button to launch oblogout > which brings up a bunch of buttons that allow me to > logout/suspend/restart/halt etc etc. I can of course continue to use acpid > to handle the power button, but that

[systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
Hi, I liked the idea of systemd when I first saw it, but after doing a few conversions I have some small issues. I run arch linux with slim & openbox and that seems to be fully supported so far as I can tell. However, on my netbooks I like to use the power button to launch oblogout which bri

Re: [systemd-devel] [PATCH] core: avoid needless strdup by working with strings directly

2012-08-16 Thread Colin Guthrie
'Twas brillig, and Shawn Landden at 16/08/12 02:13 did gyre and gimble: > --- > src/core/main.c | 51 ++- > 1 file changed, 22 insertions(+), 29 deletions(-) > > diff --git a/src/core/main.c b/src/core/main.c > index cdd77c1..e9b656b 100644 > ---