From 35bdab779ff1ebff72b9a9b1c661978d14793924 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Aug 2015 19:06:01 +0200 Subject: terminal-util: no real reason to assert on O_CREAT That's just handle this as a normal error. --- src/basic/terminal-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-54-g00ecf