diff options
-rw-r--r-- | loginutils/getty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index 94c9147ab..015f077d6 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -268,7 +268,7 @@ static void open_tty(const char *tty) | |||
268 | * Standard input should already be connected to an open port. Make | 268 | * Standard input should already be connected to an open port. Make |
269 | * sure it is open for read/write. | 269 | * sure it is open for read/write. |
270 | */ | 270 | */ |
271 | if ((fcntl(0, F_GETFL) & O_RDWR) != O_RDWR) | 271 | if ((fcntl(0, F_GETFL) & (O_RDWR|O_RDONLY|O_WRONLY)) != O_RDWR) |
272 | bb_error_msg_and_die("stdin is not open for read/write"); | 272 | bb_error_msg_and_die("stdin is not open for read/write"); |
273 | } | 273 | } |
274 | } | 274 | } |