Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 33648 invoked from network); 12 Jan 2009 14:29:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 14:29:00 -0000 Received: (qmail 95553 invoked by uid 500); 12 Jan 2009 14:29:00 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 95517 invoked by uid 500); 12 Jan 2009 14:28:59 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 95508 invoked by uid 99); 12 Jan 2009 14:28:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 06:28:59 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 14:28:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DB8F23888F1; Mon, 12 Jan 2009 06:28:36 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r733773 - in /apr/apr/trunk: STATUS include/apr_thread_proc.h include/arch/unix/apr_arch_misc.h include/arch/win32/apr_arch_misc.h misc/unix/otherchild.c Date: Mon, 12 Jan 2009 14:28:28 -0000 To: commits@apr.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090112142836.7DB8F23888F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jorton Date: Mon Jan 12 06:28:23 2009 New Revision: 733773 URL: http://svn.apache.org/viewvc?rev=733773&view=rev Log: Fix the otherchild API docs to reflect the actual implementation of the 'write_fd' handling, rather than the implementation which was removed in 2001. Also fix the implementation remove pointless bit shuffling: * include/arch/win32/apr_arch_misc.h (struct apr_other_child_rec_t), include/arch/unix/apr_arch_misc.h (struct apr_other_child_rec_t): Remove unused write_fd field. * include/apr_thread_proc.h: Document that APR_OC_REASON_UNWRITABLE is unused. (apr_proc_other_child_register): Document that the unused write_fd parameter is unused. * misc/unix/otherchild.c (apr_proc_other_child_register): Ignore the write_fd parameter rather than copying it then ignoring it. * STATUS: Move comments on possible future of the write_fd argument here. Modified: apr/apr/trunk/STATUS apr/apr/trunk/include/apr_thread_proc.h apr/apr/trunk/include/arch/unix/apr_arch_misc.h apr/apr/trunk/include/arch/win32/apr_arch_misc.h apr/apr/trunk/misc/unix/otherchild.c Modified: apr/apr/trunk/STATUS URL: http://svn.apache.org/viewvc/apr/apr/trunk/STATUS?rev=733773&r1=733772&r2=733773&view=diff ============================================================================== --- apr/apr/trunk/STATUS [utf-8] (original) +++ apr/apr/trunk/STATUS [utf-8] Mon Jan 12 06:28:23 2009 @@ -373,6 +373,14 @@ Interface Changes Postponed for APR 2.0: + * apr_proc_other_child_register()'s write_fd argument should be removed + or made used. The comment in the API previously said: + + write_fd duplicates the proc->out stream, it's really + redundant and should be replaced in the APR 1.0 API with a + bitflag of which proc->in/out/err handles should be health + checked. no platform currently tests the pipes health. + * apr_atomic_casptr() has the volatile qualifier in the wrong place: should take "pointer to volatile pointer to void", not "pointer to pointer to volatile void". Modified: apr/apr/trunk/include/apr_thread_proc.h URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_thread_proc.h?rev=733773&r1=733772&r2=733773&view=diff ============================================================================== --- apr/apr/trunk/include/apr_thread_proc.h (original) +++ apr/apr/trunk/include/apr_thread_proc.h Mon Jan 12 06:28:23 2009 @@ -113,7 +113,7 @@ */ #define APR_OC_REASON_DEATH 0 /**< child has died, caller must call * unregister still */ -#define APR_OC_REASON_UNWRITABLE 1 /**< write_fd is unwritable */ +#define APR_OC_REASON_UNWRITABLE 1 /**< currently unused. */ #define APR_OC_REASON_RESTART 2 /**< a restart is occuring, perform * any necessary cleanup (including * sending a special signal to child) @@ -693,14 +693,9 @@ * @param maintenance maintenance is a function that is invoked with a * reason and the data pointer passed here. * @param data Opaque context data passed to the maintenance function. - * @param write_fd An fd that is probed for writing. If it is ever unwritable - * then the maintenance is invoked with reason - * OC_REASON_UNWRITABLE. + * @param write_fd This argument is currently unused and should be passed + * as NULL. * @param p The pool to use for allocating memory. - * @bug write_fd duplicates the proc->out stream, it's really redundant - * and should be replaced in the APR 1.0 API with a bitflag of which - * proc->in/out/err handles should be health checked. - * @bug no platform currently tests the pipes health. */ APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc, void (*maintenance) (int reason, Modified: apr/apr/trunk/include/arch/unix/apr_arch_misc.h URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_misc.h?rev=733773&r1=733772&r2=733773&view=diff ============================================================================== --- apr/apr/trunk/include/arch/unix/apr_arch_misc.h (original) +++ apr/apr/trunk/include/arch/unix/apr_arch_misc.h Mon Jan 12 06:28:23 2009 @@ -55,7 +55,6 @@ apr_proc_t *proc; void (*maintenance) (int, void *, int); void *data; - apr_os_file_t write_fd; }; #if defined(WIN32) || defined(NETWARE) Modified: apr/apr/trunk/include/arch/win32/apr_arch_misc.h URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/win32/apr_arch_misc.h?rev=733773&r1=733772&r2=733773&view=diff ============================================================================== --- apr/apr/trunk/include/arch/win32/apr_arch_misc.h (original) +++ apr/apr/trunk/include/arch/win32/apr_arch_misc.h Mon Jan 12 06:28:23 2009 @@ -52,7 +52,6 @@ apr_proc_t *proc; void (*maintenance) (int, void *, int); void *data; - apr_os_file_t write_fd; }; #define WSAHighByte 2 Modified: apr/apr/trunk/misc/unix/otherchild.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/unix/otherchild.c?rev=733773&r1=733772&r2=733773&view=diff ============================================================================== --- apr/apr/trunk/misc/unix/otherchild.c (original) +++ apr/apr/trunk/misc/unix/otherchild.c Mon Jan 12 06:28:23 2009 @@ -63,20 +63,6 @@ ocr->proc = proc; ocr->maintenance = maintenance; ocr->data = data; - if (write_fd == NULL) { - ocr->write_fd = (apr_os_file_t) -1; - } - else { -#ifdef WIN32 - /* This should either go away as part of eliminating apr_proc_probe_writable_fds - * or write_fd should point to an apr_file_t - */ - ocr->write_fd = write_fd->filehand; -#else - ocr->write_fd = write_fd->filedes; -#endif - - } ocr->next = other_children; other_children = ocr; apr_pool_cleanup_register(p, ocr->data, other_child_cleanup,