Run jobs with 'set -e' so that they exit on error.
[whenjobs.git] / lib / whenproto.x
index 58d3ca2..2ca662f 100644 (file)
@@ -44,13 +44,16 @@ union status switch (status_code s) {
 };
 
 enum variable_type {
-  BOOL_T = 0,
-  STRING_T = 1,
-  INT_T = 2,
-  FLOAT_T = 3
+  UNIT_T = 0,
+  BOOL_T = 1,
+  STRING_T = 2,
+  INT_T = 3,
+  FLOAT_T = 4
 };
 
 union variable switch (variable_type t) {
+ case UNIT_T:
+   void;
  case BOOL_T:
    bool b;
  case STRING_T:
@@ -65,7 +68,7 @@ union variable switch (variable_type t) {
 program When {
   version V1 {
     status reload_file (void) = 1;
-    void set_variable (variable_name, variable) = 2;
+    status set_variable (variable_name, variable) = 2;
     variable get_variable (variable_name) = 3;
     variable_name_list get_variable_names (void) = 4;
     status exit_daemon (void) = 5;