1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
* Avoid closing stdin (I could have sworn I've committed that already)
* unclean_shutdown patches
This commit is contained in:
Zeev Suraski
1999-05-11 21:39:48 +00:00
parent e22cce0dda
commit 6bc6dacf5c
2 changed files with 8 additions and 2 deletions

View File

@@ -167,11 +167,15 @@ ZEND_API void zend_close_file_handle(zend_file_handle *file_handle)
close(file_handle->handle.fd);
break;
case ZEND_HANDLE_FP:
fclose(file_handle->handle.fp);
if (file_handle->handle.fp != stdin) {
fclose(file_handle->handle.fp);
}
break;
#ifdef ZTS
case ZEND_HANDLE_ISTREAM:
delete file_handle->handle.is;
if (file_handle->handle.is != &cin) {
delete file_handle->handle.is;
}
break;
#endif
}

View File

@@ -322,8 +322,10 @@ void zenderror(char *error)
ZEND_API void zend_bailout()
{
CLS_FETCH();
ELS_FETCH();
CG(unclean_shutdown) = 1;
longjmp(EG(bailout), FAILURE);
}