]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
run: complain when --pty is used together with --no-block, which makes no sense
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Dec 2016 23:30:49 +0000 (00:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Feb 2017 10:51:57 +0000 (11:51 +0100)
src/run/run.c

index 3e3116f2355cdcfe4f873610ea3ee7ad4959ea70..df3b47af29e9c74c399093a0bacfd803dfbbd924 100644 (file)
@@ -403,6 +403,11 @@ static int parse_argv(int argc, char *argv[]) {
                 return -EINVAL;
         }
 
+        if (arg_pty && arg_no_block) {
+                log_error("--pty is not compatible with --no-block.");
+                return -EINVAL;
+        }
+
         if (arg_scope && with_timer()) {
                 log_error("Timer options are not supported in --scope mode.");
                 return -EINVAL;