com php-src: Hide warning message after fatal errors: main/streams/streams.c

From: Date: Fri, 20 Jun 2014 09:31:43 +0000
Subject: com php-src: Hide warning message after fatal errors: main/streams/streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78999@lists.php.net to get a copy of this message
Commit: 2777662694f86da5a6200b0bfb46043e72b25103 Author: Dmitry Stogov <dmitry@zend.com> Fri, 20 Jun 2014 13:31:43 +0400 Parents: 51524221948da8824d11d8682c516d802a7ce4e7 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2777662694f86da5a6200b0bfb46043e72b25103 Log: Hide warning message after fatal errors Changed paths: M main/streams/streams.c Diff: diff --git a/main/streams/streams.c b/main/streams/streams.c index 02a313b..f305fe8 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -524,20 +524,22 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov /* it leaked: Lets deliberately NOT pefree it so that the memory manager shows it * as leaked; it will log a warning, but lets help it out and display what kind * of stream it was. */ - char *leakinfo; - spprintf(&leakinfo, 0, __FILE__ "(%d) : Stream of type '%s' %p (path:%s) was not closed\n", __LINE__, stream->ops->label, stream, stream->orig_path); + if (!CG(unclean_shutdown)) { + char *leakinfo; + spprintf(&leakinfo, 0, __FILE__ "(%d) : Stream of type '%s' %p (path:%s) was not closed\n", __LINE__, stream->ops->label, stream, stream->orig_path); - if (stream->orig_path) { - pefree(stream->orig_path, stream->is_persistent); - stream->orig_path = NULL; - } + if (stream->orig_path) { + pefree(stream->orig_path, stream->is_persistent); + stream->orig_path = NULL; + } # if defined(PHP_WIN32) - OutputDebugString(leakinfo); + OutputDebugString(leakinfo); # else - fprintf(stderr, "%s", leakinfo); + fprintf(stderr, "%s", leakinfo); # endif - efree(leakinfo); + efree(leakinfo); + } } else { if (stream->orig_path) { pefree(stream->orig_path, stream->is_persistent);

« previous php.cvs (#78999) next »