]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/child.c
Merge branch 'hide' into next
[i3/i3] / i3bar / src / child.c
index 054c007f879eaab0f950074e6ddd1767acb75278..2ba839ecd121a0232ea28dbbe8ff818caa7d4289 100644 (file)
@@ -149,7 +149,7 @@ void start_child(char *command) {
 }
 
 /*
- * kill()s the child-prozess (if existend) and closes and
+ * kill()s the child-process (if existent) and closes and
  * free()s the stdin- and sigchild-watchers
  *
  */
@@ -159,3 +159,23 @@ void kill_child() {
     }
     cleanup();
 }
+
+/*
+ * Sends a SIGSTOP to the child-process (if existent)
+ *
+ */
+void stop_child() {
+    if (child_pid != 0) {
+        kill(child_pid, SIGSTOP);
+    }
+}
+
+/*
+ * Sends a SIGCONT to the child-process (if existent)
+ *
+ */
+void cont_child() {
+    if (child_pid != 0) {
+        kill(child_pid, SIGCONT);
+    }
+}