diff options
-rw-r--r-- | schedutils/chrt.c | 3 | ||||
-rw-r--r-- | schedutils/ionice.c | 2 | ||||
-rw-r--r-- | schedutils/taskset.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 944cd7748..cbf2417e8 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -31,7 +31,7 @@ #include "c.h" #include "nls.h" - +#include "closestream.h" #include "strutils.h" #include "procutils.h" @@ -218,6 +218,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); while((i = getopt_long(argc, argv, "+abfiphmoRrvV", longopts, NULL)) != -1) { diff --git a/schedutils/ionice.c b/schedutils/ionice.c index 18529753f..5fdeccf8d 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -17,6 +17,7 @@ #include "nls.h" #include "strutils.h" #include "c.h" +#include "closestream.h" static int tolerant; @@ -139,6 +140,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); while ((c = getopt_long(argc, argv, "+n:c:p:tVh", longopts, NULL)) != EOF) switch (c) { diff --git a/schedutils/taskset.c b/schedutils/taskset.c index b7aee5064..908ac8e2d 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -34,6 +34,7 @@ #include "xalloc.h" #include "procutils.h" #include "c.h" +#include "closestream.h" struct taskset { pid_t pid; /* task PID */ @@ -146,6 +147,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); memset(&ts, 0, sizeof(ts)); |