1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Added patch to fix SF#1279867, 'error messages from die() are lost'.

Obtained from:	http://sourceforge.net/tracker/index.php?func=detail&aid=1279867&group_id=2208&atid=102208
This commit is contained in:
Lars Thegler 2005-10-06 14:09:56 +00:00
parent 6404db2ec2
commit ffbbfc71ad
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=144404
2 changed files with 33 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= CGI-SpeedyCGI
PORTVERSION= 2.22
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= CGI

View File

@ -0,0 +1,32 @@
--- src/speedy_main.c 2005/08/31 19:56:57 1.1
+++ src/speedy_main.c 2005/08/31 19:57:42
@@ -299,6 +299,7 @@
/* Copy streams */
while (1) {
/* Do reads/writes */
+ int close_stdout_delayed = 0;
for (i = 0; i < NUMFDS; ++i) {
register CopyBuf *b = cb + i;
int do_read = my_canread(b) &&
@@ -346,10 +347,17 @@
/* Try to close files now, so we can wake up the backend
* and do more I/O before dropping into select
*/
- if (!do_read && !do_write)
- try_close(b);
- }
- }
+ if (!do_read && !do_write) {
+ if (i == 1)
+ /* delay closing STDOUT until all the other fds are closed */
+ close_stdout_delayed = 1;
+ else
+ try_close(b);
+ }
+ }
+ }
+ if (close_stdout_delayed)
+ try_close(cb+1);
/* All done with reads/writes after backend exited */
if (backend_exited) {