diff options
Diffstat (limited to 'src/basic/terminal-util.c')
-rw-r--r-- | src/basic/terminal-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index f4c7489e09..cf55263bbf 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -308,7 +308,8 @@ int open_terminal(const char *name, int mode) { * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245 */ - assert(!(mode & O_CREAT)); + if (mode & O_CREAT) + return -EINVAL; for (;;) { fd = open(name, mode, 0); |