diff options
author | fhajny <fhajny@pkgsrc.org> | 2014-06-13 14:09:34 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2014-06-13 14:09:34 +0000 |
commit | a84ae7b840232985e82198a5ff81ea91a49e72ee (patch) | |
tree | f82c7382495f775a6601a5c9f2afc386c57d91eb /lang/php53 | |
parent | 5cca38d95c9e87248e04671354491efffe1aff7d (diff) | |
download | pkgsrc-a84ae7b840232985e82198a5ff81ea91a49e72ee.tar.gz |
Fix problems on SunOS with the combination of FPM, event ports and catch_workers_output=yes.
See https://bugs.php.net/bug.php?id=65800.
Diffstat (limited to 'lang/php53')
-rw-r--r-- | lang/php53/distinfo | 3 | ||||
-rw-r--r-- | lang/php53/patches/patch-sapi_fpm_fpm_events_port.c | 47 |
2 files changed, 49 insertions, 1 deletions
diff --git a/lang/php53/distinfo b/lang/php53/distinfo index 6b9196ddce2..14974fb8fcc 100644 --- a/lang/php53/distinfo +++ b/lang/php53/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.73 2014/05/11 11:20:47 he Exp $ +$NetBSD: distinfo,v 1.74 2014/06/13 14:09:34 fhajny Exp $ SHA1 (php-5.3.28.tar.bz2) = f985ca1f6a5f49ebfb25a08f1837a44c563b31f8 RMD160 (php-5.3.28.tar.bz2) = e4910c0c365f39a5009807801bd5ee6e25be020d @@ -25,4 +25,5 @@ SHA1 (patch-ext_gd_libgd_gdxpm.c) = 9a175417fad9ac23037a24122f8d1258b9eebbcb SHA1 (patch-ext_standard_basic__functions.c) = 017fd25e646af4d7eb2a0bd13b3c8da34eaee8c5 SHA1 (patch-main_streams_cast.c) = d68b69c9418a8780b1610b8755487771f7c46a5a SHA1 (patch-php__mssql.c) = 524c4e5d7ede0e503049bf1febec58e0c4a29aa4 +SHA1 (patch-sapi_fpm_fpm_events_port.c) = ad45bcebadf923ee8cb3f2ad4d78d21dd178a8e3 SHA1 (patch-sapi_fpm_php-fpm.conf.in) = 86137a37e74badf99c46d1ba7ca5d85f42bedfce diff --git a/lang/php53/patches/patch-sapi_fpm_fpm_events_port.c b/lang/php53/patches/patch-sapi_fpm_fpm_events_port.c new file mode 100644 index 00000000000..b1a5f1ff202 --- /dev/null +++ b/lang/php53/patches/patch-sapi_fpm_fpm_events_port.c @@ -0,0 +1,47 @@ +$NetBSD: patch-sapi_fpm_fpm_events_port.c,v 1.1 2014/06/13 14:09:34 fhajny Exp $ + +Fix code to make FPM intercept signals properly even with pipes (via catch_workers_output=yes). +See https://bugs.php.net/bug.php?id=65800. +--- sapi/fpm/fpm/events/port.c.orig 2013-09-18 05:48:57.000000000 +0000 ++++ sapi/fpm/fpm/events/port.c +@@ -124,6 +124,7 @@ static int fpm_event_port_wait(struct fp + t.tv_nsec = (timeout % 1000) * 1000 * 1000; + + /* wait for inconming event or timeout. We want at least one event or timeout */ ++again: + nget = 1; + ret = port_getn(pfd, events, nevents, &nget, &t); + if (ret < 0) { +@@ -133,17 +134,31 @@ static int fpm_event_port_wait(struct fp + zlog(ZLOG_WARNING, "poll() returns %d", errno); + return -1; + } ++ ++ if (errno == EINTR) ++ goto again; ++ ++ return 0; + } + + for (i = 0; i < nget; i++) { ++ struct fpm_event_s *ev; + + /* do we have a ptr to the event ? */ + if (!events[i].portev_user) { + continue; + } + ++ ev = (struct fpm_event_s *)events[i].portev_user; ++ ++ if (port_associate(pfd, PORT_SOURCE_FD, ++ ev->fd, POLLIN, (void *)ev) < 0) { ++ zlog(ZLOG_ERROR, "port: unable to add the event"); ++ return -1; ++ } ++ + /* fire the event */ +- fpm_event_fire((struct fpm_event_s *)events[i].portev_user); ++ fpm_event_fire(ev); + + /* sanity check */ + if (fpm_globals.parent_pid != getpid()) { |