Commit Graph

23 Commits

Author SHA1 Message Date
Kristian Høgsberg
f2807701d9 weston-launch: Switch to regular poll
epoll doesn't provide any convenince here and is just awkward to use.
2013-07-25 15:58:00 -07:00
Kristian Høgsberg
636156d5f6 weston-launch: Don't start new session unless -u is given 2013-07-25 15:57:01 -07:00
Kristian Høgsberg
ab4999492c weston-launch: Drop sleep_fork option 2013-07-25 15:56:58 -07:00
Kristian Høgsberg
ca70f2fc68 weston-launch: Move child setup and exec to its own function 2013-07-25 15:56:49 -07:00
Kristian Høgsberg
18684d442e weston-launch: Ignore sighup
When our session terminates all processes get a SIGHUP.  We need to ignore
that in weston-launch and stay around to help weston shut down properly.

https://bugs.freedesktop.org/show_bug.cgi?id=63004
2013-07-22 16:34:41 -07:00
Kristian Høgsberg
07d48a306e weston-launch: Fix the typo for real this time
Thanks to MonkeyofDoom for point this out.  I'm still adjusting to the
fact that there's no 'd' in privilege, but I'll get over it.
2013-07-08 14:34:53 -04:00
Kristian Høgsberg
7e80f1b656 weston-launch: Fix an error message typo 2013-07-08 12:56:28 -04:00
Quentin Glidic
735302ea2d weston-launch: Set all groups for user
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>

https://bugs.freedesktop.org/show_bug.cgi?id=65933
2013-07-08 12:56:24 -04:00
Kristian Høgsberg
1a81abb1dd weston-launch: Don't exit on SIGTERM
Instead, forward signal to weston and wait for weston to clean up nicely.
Weston relies on weston-launch being around to shut down correctly,
so don't exit until we get the SIGCHLD from weston.  This make
killall weston-launch work properly.

https://bugs.freedesktop.org/show_bug.cgi?id=62910
2013-06-17 15:46:07 -04:00
Daniel Stone
c228e23b05 configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS
AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar
macros to expose the largest extent of functionality supported by the
underlying system.  This is required since these macros are often
limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually
on some systems hide declarations which are not part of the X/Open spec.

Since this goes into config.h rather than the command line, ensure all
source is consistently including config.h before anything else,
including system libraries.  This doesn't need to be guarded by a
HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org
modular transition.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

[pq: rebased and converted more files]
2013-06-05 01:16:34 -04:00
Ander Conselvan de Oliveira
9bdfc48f09 weston-launch: Fix failure to exec weston due to initalized argv values
The array of arguments supplied to execv must be NULL terminated. If
unitialized values are used as pointers the exec call may fail with a
EFAULT error ("Bad address").

https://bugs.freedesktop.org/show_bug.cgi?id=64874
2013-05-22 16:39:36 -04:00
Rob Bradford
d33f2b065c weston-launch: Print explanation of why we failed to open the device 2013-05-20 16:55:12 -04:00
Quentin Glidic
ff3230952a weston-launch: Run weston in the user login shell
This patch brings back the user environment from the shell.
In the future, weston-launch could create the Wayland socket earlier, in
which case the user's shell could be used to run Wayland-specific tools
in the new Weston session.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-05-17 16:23:46 -04:00
Siddharth Heroor
d6be88b5e2 weston-launch: cleanup - return failures in main with EXIT_FAILURE
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
2013-03-19 14:41:05 -04:00
Philipp Brüschweiler
7a3ec74cb6 weston-launch: return better value if weston dies because of a signal
Before this commit, weston-launch returned 0 if weston was killed by a
signal. This makes it hard to automatically test weston by using
weston-launch, as there is no way to know why weston was terminated.

This commit makes weston-launch return 10+N instead, where N is the code
of the signal that terminated weston. 10 was chosen because it allows a
script to distinguish it from the case that weston-launch itself was
killed by a signal (128+N), and does not overlap the standard exit codes
defined in sysexits.h.

Partial fix for https://bugs.freedesktop.org/show_bug.cgi?id=60935. I
can't reproduce the SIGHUP using the fbdev backend.

v3: better commit message.
2013-03-19 14:28:23 -04:00
Philipp Brüschweiler
ff253129c5 weston-launch: move function calls out of assert() 2013-03-19 14:28:01 -04:00
Kristian Høgsberg
272d243e00 weston-launch: Clear environment and set it up from scratch
With recent systemd[1] XDG_VTNR will leak through to pam, which ends up
setting a vtnr pam argument with the wrong value.  The fix is to clear
XDG_VTNR first, but what we should have been doing all along is resetting
the environment.

Thanks to Ray Strode for helping debug this.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=a8573ccc35a4efe8900be5d48c6c803670540c2b
2013-01-29 14:19:14 -05:00
Scott Moreau
cc9acfc75e weston-launch: Use "weston-launch" for --help instead of "weston".
The output of weston-launch --help was "Usage: weston [args...] ...".
This changes it to read "Usage: weston-launch [args...] ...".
2013-01-24 16:41:18 -05:00
Rob Bradford
40be7b467f weston-launch: Add some error reporting for weston-launch
This also avoids us passing (size_t)(-1 * sizeof(gid_t)) into malloc
2012-12-06 22:33:25 -05:00
John Kåre Alsaker
5b90d8f374 weston-launch: Check result of pam_start. 2012-10-16 11:26:00 -04:00
Tiago Vignatti
314db6edef weston-launch: be more descriptive with output messages
Specially the "either" word there is essential, so users don't confuse
thinking that both steps are needed.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-04-17 14:10:42 -04:00
Kristian Høgsberg
9e14091778 weston-launcher: Fix aliasing warnings 2012-04-10 01:26:18 -04:00
Benjamin Franzke
bfeda130de Introduce weston-launch
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.

Execution is allowed for local-active sessions
or users in the group weston-launch.
2012-04-06 14:01:19 +02:00