svn commit: r531530 - in head/www/fcgiwrap: . files

Rodrigo Osorio rodrigo at FreeBSD.org
Sun Apr 12 16:17:50 UTC 2020


Author: rodrigo
Date: Sun Apr 12 16:17:49 2020
New Revision: 531530
URL: https://svnweb.freebsd.org/changeset/ports/531530

Log:
  www/fcgiwrap: wait for fcgiwrap named socket creation before chown
  
  In certain circumstances postcmd function is called before
  named sockets be created by fcgiwrap, causing a startup
  failure. This change leave up to 5 seconds to fcgiwrap to
  properly start.
  
  Bump PORTREVISION.
  
  PR:		219753
  Reported by:	Shuichi KITAGUCHI <ki at hh.iij4u.or.jp>

Modified:
  head/www/fcgiwrap/Makefile
  head/www/fcgiwrap/files/fcgiwrap.in

Modified: head/www/fcgiwrap/Makefile
==============================================================================
--- head/www/fcgiwrap/Makefile	Sun Apr 12 16:12:07 2020	(r531529)
+++ head/www/fcgiwrap/Makefile	Sun Apr 12 16:17:49 2020	(r531530)
@@ -2,7 +2,7 @@
 
 PORTNAME=	fcgiwrap
 PORTVERSION=	1.1.0
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	www
 
 MAINTAINER=	rodrigo at FreeBSD.org

Modified: head/www/fcgiwrap/files/fcgiwrap.in
==============================================================================
--- head/www/fcgiwrap/files/fcgiwrap.in	Sun Apr 12 16:12:07 2020	(r531529)
+++ head/www/fcgiwrap/files/fcgiwrap.in	Sun Apr 12 16:17:49 2020	(r531530)
@@ -79,6 +79,11 @@ fcgiwrap_postcmd() {
 			return
 			;;
 	esac
+	# Wait up to 5 seconds for the socket file
+	for i in $(seq 5); do
+		[ -e ${fcgiwrap_socket#unix:} ] && break
+		sleep 1
+	done
 	if [ -n "${fcgiwrap_socket_mode}" ]; then
 		chmod ${fcgiwrap_socket_mode} ${fcgiwrap_socket#unix:}
 	fi


More information about the svn-ports-all mailing list