Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Avoid zombie processes from child processes

  • Loading branch information...
commit 2342a472a1226ff8699b289cba0fb487ed208087 1 parent 8de966f
Chris Thunes authored mbrown1413 committed

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. +8 0 src/main.c
8 src/main.c
@@ -4,6 +4,14 @@
4 4 int main(int argc, char** argv) {
5 5 CTerm term;
6 6 GtkRcStyle* style;
  7 + struct sigaction ignore_children;
  8 +
  9 + /* Avoid zombies when executing external programs by explicitly setting the
  10 + handler to SIG_IGN */
  11 + ignore_children.sa_handler = SIG_IGN;
  12 + ignore_children.sa_flags = 0;
  13 + sigemptyset(&ignore_children.sa_mask);
  14 + sigaction(SIGCHLD, &ignore_children, NULL);
7 15
8 16 /* Initialize GTK */
9 17 gtk_init(&argc, &argv);

0 comments on commit 2342a47

Please sign in to comment.
Something went wrong with that request. Please try again.