[PECL-CVS] [pecl-networking-gearman] fix-fork-premature-job-completion: update comment

[email protected] (Rasmus Lerdorf) Sat, 4 Apr 2026 14:52:17 +0000
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Rasmus Lerdorf (rlerdorf)
Date: 2026-04-04T10:52:12-04:00

Commit: https://github.com/php/pecl-networking-gearman/commit/81dfa40ca7d82ac8194e8e08d3d581a1bc92b9db
Raw diff: https://github.com/php/pecl-networking-gearman/commit/81dfa40ca7d82ac8194e8e08d3d581a1bc92b9db.diff

update comment

Changed paths:
  M  php_gearman_worker.c


Diff:

diff --git a/php_gearman_worker.c b/php_gearman_worker.c
index cd10e7e..1842d80 100644
--- a/php_gearman_worker.c
+++ b/php_gearman_worker.c
@@ -62,10 +62,11 @@ void gearman_worker_free_obj(zend_object *object) {
         gearman_worker_obj *intern = gearman_worker_fetch_object(object);
 
         if (intern->flags & GEARMAN_WORKER_OBJ_CREATED) {
-                /* Skip gearman_worker_free() in forked children to avoid
+                /* In forked children, skip gearman_worker_free() to avoid
                  * sending protocol messages over the parent's connection,
                  * which would cause gearmand to prematurely mark the
-                 * parent's in-progress job as complete. See #40. */
+                 * parent's in-progress job as complete. The inherited fds
+                 * will be closed when the child process exits. See #40. */
                 if ((zend_long)getpid() == intern->created_pid) {
                         gearman_worker_free(&(intern->worker));
                 }