[cheese/shareable-media] Check child final status when using ChildWatch.add
- From: Patricia Santana Cruz <patriciasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/shareable-media] Check child final status when using ChildWatch.add
- Date: Wed, 28 Dec 2011 11:12:43 +0000 (UTC)
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]