summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/run.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/run.c')
-rw-r--r--libglusterfs/src/run.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c
index 46bb37d73..44ef2f0d7 100644
--- a/libglusterfs/src/run.c
+++ b/libglusterfs/src/run.c
@@ -422,7 +422,7 @@ TBANNER (const char *txt)
}
int
-main ()
+main (int argc, char **argv)
{
runner_t runner;
char buf[80];
@@ -430,6 +430,8 @@ main ()
int ret;
int fd;
long pathmax = pathconf ("/", _PC_PATH_MAX);
+ struct timeval tv = {0,};
+ struct timeval *tvp = NULL;
wdbuf = malloc (pathmax);
assert (wdbuf);
@@ -479,6 +481,13 @@ main ()
printf (" %d [%s]", errno, strerror (errno));
putchar ('\n');
+ if (argc > 1) {
+ tv.tv_sec = strtoul (argv[1], NULL, 10);
+ if (tv.tv_sec > 0)
+ tvp = &tv;
+ select (0, 0, 0, 0, tvp);
+ }
+
return 0;
}
#endif