[cheese/shareable-media] Check child final status when using ChildWatch.add



commit 57b1c0979253b17f6cc1e592061c69a21ebb5bb8
Author: Patricia Santana Cruz <patriciasantanacruz gmail com>
Date:   Wed Dec 28 11:09:25 2011 +0000

    Check child final status when using ChildWatch.add

 src/cheese-shareable-media.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/cheese-shareable-media.vala b/src/cheese-shareable-media.vala
index 33999ae..3b1b0e8 100644
--- a/src/cheese-shareable-media.vala
+++ b/src/cheese-shareable-media.vala
@@ -7,6 +7,10 @@ namespace ShareableMedia {
 
   void child_finished (Pid pid, int status)
   {
+    // status will be true if the child terminates normally: 
+    // calling exit(3) or _exit(2), or by returning from main()
+    assert (status == 0);
+
     Process.close_pid(pid);
     window.get_window().set_cursor(new Gdk.Cursor(Gdk.CursorType.LEFT_PTR));
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]