Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
105fbc5f
Commit
105fbc5f
authored
4 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
launch, launcher: Clarify
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
761d8873
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/launch.c
+8
-8
8 additions, 8 deletions
src/launch.c
src/launcher.c
+1
-1
1 addition, 1 deletion
src/launcher.c
with
9 additions
and
9 deletions
src/launch.c
+
8
−
8
View file @
105fbc5f
...
...
@@ -67,23 +67,23 @@ process_exited_cb (G_GNUC_UNUSED GDBusConnection *connection,
{
GMainLoop
*
loop
=
user_data
;
guint32
client_pid
=
0
;
guint32
ex
it_status
=
0
;
guint32
wa
it_status
=
0
;
if
(
!
g_variant_is_of_type
(
parameters
,
G_VARIANT_TYPE
(
"(uu)"
)))
return
;
g_variant_get
(
parameters
,
"(uu)"
,
&
client_pid
,
&
ex
it_status
);
g_debug
(
"child exited
%d:
%d"
,
client_pid
,
ex
it_status
);
g_variant_get
(
parameters
,
"(uu)"
,
&
client_pid
,
&
wa
it_status
);
g_debug
(
"child
%d
exited
: wait status
%d"
,
client_pid
,
wa
it_status
);
if
(
child_pid
==
client_pid
)
{
int
exit_code
=
0
;
if
(
WIFEXITED
(
ex
it_status
))
if
(
WIFEXITED
(
wa
it_status
))
{
exit_code
=
WEXITSTATUS
(
ex
it_status
);
exit_code
=
WEXITSTATUS
(
wa
it_status
);
}
else
if
(
WIFSIGNALED
(
ex
it_status
))
else
if
(
WIFSIGNALED
(
wa
it_status
))
{
/* Smush the signal into an unsigned byte, as the shell does. This is
* not quite right from the perspective of whatever ran flatpak-spawn
...
...
@@ -91,7 +91,7 @@ process_exited_cb (G_GNUC_UNUSED GDBusConnection *connection,
* alternative is to disconnect all signal() handlers then send this
* signal to ourselves and hope it kills us.
*/
exit_code
=
128
+
WTERMSIG
(
ex
it_status
);
exit_code
=
128
+
WTERMSIG
(
wa
it_status
);
}
else
{
...
...
@@ -100,7 +100,7 @@ process_exited_cb (G_GNUC_UNUSED GDBusConnection *connection,
* of WIFEXITED() or WIFSIGNALED() will be true.
*/
g_warning
(
"exit status %d is neither WIFEXITED() nor WIFSIGNALED()"
,
ex
it_status
);
wa
it_status
);
exit_code
=
LAUNCH_EX_CANNOT_REPORT
;
}
...
...
This diff is collapsed.
Click to expand it.
src/launcher.c
+
1
−
1
View file @
105fbc5f
...
...
@@ -135,7 +135,7 @@ child_watch_died (GPid pid,
PidData
*
pid_data
=
user_data
;
g_autoptr
(
GVariant
)
signal_variant
=
NULL
;
g_debug
(
"C
lient Pi
d %d died"
,
pid_data
->
pid
);
g_debug
(
"C
hil
d %d died
: wait status %d
"
,
pid_data
->
pid
,
status
);
signal_variant
=
g_variant_ref_sink
(
g_variant_new
(
"(uu)"
,
pid
,
status
));
g_dbus_connection_emit_signal
(
pid_data
->
connection
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment