aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/watch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/procps/watch.c b/procps/watch.c
index 1190b29df..56b128df6 100644
--- a/procps/watch.c
+++ b/procps/watch.c
@@ -71,9 +71,16 @@ int watch_main(int argc UNUSED_PARAM, char **argv)
71 71
72 // watch from both procps 2.x and 3.x does concatenation. Example: 72 // watch from both procps 2.x and 3.x does concatenation. Example:
73 // watch ls -l "a /tmp" "2>&1" - ls won't see "a /tmp" as one param 73 // watch ls -l "a /tmp" "2>&1" - ls won't see "a /tmp" as one param
74#if ENABLE_PLATFORM_MINGW32
75 cmd = NULL;
76 do {
77 cmd = xappendword(cmd, *argv);
78 } while (*++argv);
79#else
74 cmd = *argv; 80 cmd = *argv;
75 while (*++argv) 81 while (*++argv)
76 cmd = xasprintf("%s %s", cmd, *argv); // leaks cmd 82 cmd = xasprintf("%s %s", cmd, *argv); // leaks cmd
83#endif
77 84
78 period = parse_duration_str(period_str); 85 period = parse_duration_str(period_str);
79 width = (unsigned)-1; // make sure first time new_width != width 86 width = (unsigned)-1; // make sure first time new_width != width