Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37779205
en ru br
Репозитории ALT
S:2.22-alt9
5.1: 2.22-alt2
4.1: 2.22-alt2
4.0: 2.22-alt2
3.0: 2.22-alt1
www.altlinux.org/Changes

Группа :: Разработка/Perl
Пакет: perl-CGI-SpeedyCGI

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: perl-CGI-SpeedyCGI-2.22-exit_messages.patch
Скачать


Patch by Jose Carlos Garcia Sogo <jsogo@debian.org> for perl-CGI-SpeedyCGI >= 2.22, which tries to
log exit messages on die(). See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=326442
--- CGI-SpeedyCGI-2.22/src/speedy_main.c			2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_main.c.exit_messages		2008-05-04 20:50:56.000000000 +0200
@@ -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,11 +347,19 @@
 		/* 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) {
 	    if (am_child) {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin