Mir

Merge lp:~alan-griffiths/mir/fix-1705439 into lp:mir

Proposed by Alan Griffiths on 2017-07-20
Status: Merged
Approved by: Gerry Boland on 2017-07-20
Approved revision: 4210
Merged at revision: 4211
Proposed branch: lp:~alan-griffiths/mir/fix-1705439
Merge into: lp:mir
Diff against target: 20 lines (+2/-1)
1 file modified
examples/target.c (+2/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1705439
Reviewer Review Type Date Requested Status
Gerry Boland (community) 2017-07-20 Approve on 2017-07-20
Mir CI Bot continuous-integration Approve on 2017-07-20
Review via email: mp+327797@code.launchpad.net

Commit message

[mir_demo_client_target] exit on receipt of mir_event_type_close_window. (LP: #1705439)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4210
https://mir-jenkins.ubuntu.com/job/mir-ci/3500/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4785
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4959
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/4948
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4948
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4948
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4822/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4822
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4822/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3500/rebuild

review: Approve (continuous-integration)
Gerry Boland (gerboland) wrote :

Why not exit(0)?

Alan Griffiths (alan-griffiths) wrote :

> Why not exit(0)?

Because I want the program to shutdown normally. (I'm not sure why there's a pthread wating for an interrupt, but kill() feeds it one.)

Gerry Boland (gerboland) wrote :

Seppuku looks a little severe, but gets the job done

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/target.c'
2--- examples/target.c 2017-06-06 15:41:28 +0000
3+++ examples/target.c 2017-07-20 14:46:06 +0000
4@@ -25,6 +25,7 @@
5 #include <pthread.h>
6 #include <stdlib.h>
7 #include <signal.h>
8+#include <unistd.h>
9
10 enum
11 {
12@@ -200,7 +201,7 @@
13 state->resized = true;
14 break;
15 case mir_event_type_close_window:
16- state->running = false;
17+ kill(getpid(), SIGTERM);
18 break;
19 default:
20 break;

Subscribers

People subscribed via source and target branches