summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-11-22 14:04:45 +0100
committerJo-Philipp Wich <jo@mein.io>2018-11-22 14:28:28 +0100
commitecd1660f17ea257ea005253babcc773f0e9f7180 (patch)
tree7d69f9309858f53323571b9052182139a91afb6d /include
parent41333abee4c57e3de2bcfa08972954e2af20705a (diff)
downloadrpcd-ecd1660f17ea257ea005253babcc773f0e9f7180.tar.gz
exec: increase maximum execution time to 120s
Increase the maximum possible execution time to 120 seconds and add a new command line flag `-t` which allows overwriting the default value. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r--include/rpcd/exec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rpcd/exec.h b/include/rpcd/exec.h
index efe4cca..01981fe 100644
--- a/include/rpcd/exec.h
+++ b/include/rpcd/exec.h
@@ -24,7 +24,7 @@
#include <libubox/ustream.h>
#define RPC_EXEC_MAX_SIZE (4096 * 64)
-#define RPC_EXEC_MAX_RUNTIME (30 * 1000)
+#define RPC_EXEC_DEFAULT_TIMEOUT (120 * 1000)
#define ustream_for_each_read_buffer(stream, ptr, len) \
for (ptr = ustream_get_read_buf(stream, &len); \
@@ -50,6 +50,7 @@
ustream_fd_init(&us, fd); \
} while(0)
+extern int exec_timeout;
typedef int (*rpc_exec_write_cb_t)(struct ustream *, void *);
typedef int (*rpc_exec_read_cb_t)(struct blob_buf *, char *, int, void *);