mirror of
https://github.com/php/php-src.git
synced 2026-04-20 06:21:12 +02:00
Fixes:
* Avoid closing stdin (I could have sworn I've committed that already) * unclean_shutdown patches
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user