From a91065c63ce51ea238db38d88ac12ea8e4adeb1e Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 9 Aug 2015 18:54:20 +0200 Subject: [PATCH] don't close stdin --- ext/mcrypt/mcrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 4c8f3a2d05..bf71e74067 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -356,12 +356,12 @@ static PHP_GINIT_FUNCTION(mcrypt) static PHP_GSHUTDOWN_FUNCTION(mcrypt) { - if (mcrypt_globals->fd[RANDOM] >= 0) { + if (mcrypt_globals->fd[RANDOM] > 0) { close(mcrypt_globals->fd[RANDOM]); mcrypt_globals->fd[RANDOM] = -1; } - if (mcrypt_globals->fd[URANDOM] >= 0) { + if (mcrypt_globals->fd[URANDOM] > 0) { close(mcrypt_globals->fd[URANDOM]); mcrypt_globals->fd[URANDOM] = -1; } -- 2.50.1