Merge lp:~dobey/ubuntu-app-launch/test-exit-code into lp:ubuntu-app-launch/15.04

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 190
Merged at revision: 190
Proposed branch: lp:~dobey/ubuntu-app-launch/test-exit-code
Merge into: lp:ubuntu-app-launch/15.04
Diff against target: 20 lines (+3/-2)
1 file modified
ubuntu-app-test/src/ubuntu-app-test.c (+3/-2)
To merge this branch: bzr merge lp:~dobey/ubuntu-app-launch/test-exit-code
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Alejandro J. Cura (community) Approve
Charles Kerr (community) Approve
Review via email: mp+252821@code.launchpad.net

Commit message

Save status from waitpid and exit with it.

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM.

review: Approve
190. By dobey

Save status from waitpid and exit with it.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks better.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-app-test/src/ubuntu-app-test.c'
2--- ubuntu-app-test/src/ubuntu-app-test.c 2015-02-23 17:54:59 +0000
3+++ ubuntu-app-test/src/ubuntu-app-test.c 2015-03-13 16:03:59 +0000
4@@ -107,13 +107,14 @@
5 g_free(sock);
6
7 pid_t subpid = 0;
8+ int exit_status = -1;
9 if ((subpid = fork()) == 0) {
10 return execvp(argv[1], argv + 1);
11 }
12- waitpid(subpid, NULL, 0);
13+ waitpid(subpid, &exit_status, 0);
14
15 mir_prompt_session_release_sync(session);
16 mir_connection_release(mir);
17
18- return 0;
19+ return WEXITSTATUS(exit_status);
20 }

Subscribers

People subscribed via source and target branches