diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-06-17 10:00:48 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-06-17 10:00:48 +0000 |
| commit | c1ba58ff2b09604bd03d15a844fb5c09e2e38ef6 (patch) | |
| tree | d48b8f5f4c81e26e8dbb6597554286f1d6d53d3a /prgbox.c | |
| parent | 5f120a342bce9d4f0afede0510bdd9adc5bcc061 (diff) | |
Notes
Diffstat (limited to 'prgbox.c')
| -rw-r--r-- | prgbox.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,9 +1,9 @@ /* - * $Id: prgbox.c,v 1.8 2011/10/20 23:42:32 tom Exp $ + * $Id: prgbox.c,v 1.9 2012/12/02 23:40:30 tom Exp $ * * prgbox.c -- implements the prg box * - * Copyright 2011 Thomas E. Dickey + * Copyright 2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -23,6 +23,12 @@ #include <dialog.h> +static void +reapchild(int sig) +{ + (void) sig; +} + /* * Open a pipe which ties stderr and stdout together. */ @@ -96,6 +102,7 @@ dialog_prgbox(const char *title, { int code; FILE *fp; + void (*oldreaper) (int) = signal(SIGCHLD, reapchild); fp = dlg_popen(command, "r"); if (fp == NULL) @@ -104,6 +111,7 @@ dialog_prgbox(const char *title, code = dlg_progressbox(title, cprompt, height, width, pauseopt, fp); pclose(fp); + signal(SIGCHLD, oldreaper); return code; } |
