aboutsummaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/rdsvc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util/rdsvc.c b/lib/util/rdsvc.c
index 6a964f7..37c7ba0 100644
--- a/lib/util/rdsvc.c
+++ b/lib/util/rdsvc.c
@@ -70,8 +70,16 @@ static int svc_desc(service_t *svc, char *arg, rdline_t *rd)
static int svc_tty(service_t *svc, char *arg, rdline_t *rd)
{
+ if (strncmp(arg, "truncate", 8) == 0 && isspace(arg[8])) {
+ svc->flags |= SVC_FLAG_TRUNCATE_OUT;
+ arg += 8;
+ while (isspace(*arg))
+ ++arg;
+ }
+
if (try_unescape(arg, rd))
return -1;
+
svc->ctty = try_strdup(arg, rd);
return svc->ctty == NULL ? -1 : 0;
}