Received: (qmail 17387 invoked by uid 2012); 20 May 1998 14:55:50 -0000 Message-Id: <19980520145550.17386.qmail@hyperreal.org> Date: 20 May 1998 14:55:50 -0000 From: Rob Saccoccio Reply-To: robs@InfiniteTechnology.com To: apbugs@hyperreal.org Subject: The second arg to spawn_child_err() changed from "void (*)(void *)" in 1.2 to "int(*)(void *)" in 1.3 X-Send-Pr-Version: 3.2 >Number: 2258 >Category: apache-api >Synopsis: The second arg to spawn_child_err() changed from "void (*)(void *)" in 1.2 to "int(*)(void *)" in 1.3 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed May 20 08:00:01 PDT 1998 >Last-Modified: Wed Oct 7 10:47:23 PDT 1998 >Originator: robs@InfiniteTechnology.com >Organization: >Release: 1.3 >Environment: All >Description: The second arg to spawn_child_err() changed from "void (*)(void *)" (in 1.2) to "int(*)(void *)" in (1.3). This should be reflected in compat.h so as to avoid unneccessary build warnings. Additionally, calls to spawn_child() should be changed to ap_spawn_child() for consistency with the conversion to the new namespace. This will require ap_spawn_child() be defined in alloc.h instead of spawn_child() (which should be only in compat.h). The current approach is non-intuitive and sets a bad example. >How-To-Repeat: >Fix: In compat.h: #define spawn_child_err ap_spawn_child_err should become something like: #define spawn_child_err(pool,func,data,kill,in,out,err) ap_spawn_child_err(pool,(int)func,data,kill,in,out,err) >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: brian State-Changed-When: Wed May 20 17:03:42 PDT 1998 State-Changed-Why: From: "Saccoccio, Robert" To: apache-bugdb@apache.org, brian@apache.org, robs@InfiniteTechnology.com, "'brian@hyperreal.org'" Cc: "'apbugs@Apache.Org'" Subject: RE: apache-api/2258: The second arg to spawn_child_err() changed from "void (*)(void *)" in 1.2 to "int(*)(void *)" in 1.3 Date: Thu, 21 May 1998 16:06:15 -0400 > implementation. So, third-party modules which use > spawn_child are going to have to be modified for 1.3 > anyways. Also, all third-party modules should use > ap_spawn_child_err_buff to be completely safe on NT. > What's the best way to conditionally handle both 1.2.x and 1.3b6-, 1.3b7+? APACHE_RELEASE? I'm actually calling spawn_child(), not ap_spawn_child_err() (like the apache code referred to below). spawn_child(), as you mentioned, is a macro which maps to ap_spawn_child_err(). Its actually the spawn_child() API that brought this to my attention. Is that too changing with 1.3b7 (similar to the change to ap_spawn_child_err())? > > Additionally, calls to spawn_child() should be changed to > ap_spawn_child() > > for consistency with the conversion to the new namespace. This will > > require ap_spawn_child() be defined in alloc.h instead of spawn_child() > > (which should be only in compat.h). The current approach is > non-intuitive > > and sets a bad example. > > Would be nice to do, it's slightly more complex since spawn_child > is a macro but shouldn't be impossible. I'll see about doing > it. > Its not clear to me why it being a macro makes it more complex? From: Brian Behlendorf To: "Saccoccio, Robert" Cc: "'apbugs@Apache.Org'" Subject: RE: apache-api/2258: The second arg to spawn_child_err() changed from "void (*)(void *)" in 1.2 to "int(*)(void *)" in 1.3 Date: Thu, 21 May 1998 13:26:39 -0700 At 04:06 PM 5/21/98 -0400, Saccoccio, Robert wrote: >> implementation. So, third-party modules which use >> spawn_child are going to have to be modified for 1.3 >> anyways. Also, all third-party modules should use >> ap_spawn_child_err_buff to be completely safe on NT. >> >What's the best way to conditionally handle both 1.2.x and 1.3b6-, 1.3b7+? >APACHE_RELEASE? MODULE_MAGIC_NUMBER. But ideally when 1.3.0 comes out there should be no need to support previous beta versions. >I'm actually calling spawn_child(), not ap_spawn_child_err() (like the >apache code referred to below). spawn_child(), as you mentioned, is a macro >which maps to ap_spawn_child_err(). Its actually the spawn_child() API that >brought this to my attention. Is that too changing with 1.3b7 (similar to >the change to ap_spawn_child_err())? spawn_child is still available in 1.3b7 (to be released tomorrow). The whole set of spawn_* API calls may be changed before 1.3.0 final though, since as it stands it's really messy and completely abominable to try and learn (as a module author) how to do correctly. In 1.3b7 (and earlier of course) spawn_child is simply a macro on ap_spawn_child_err, so yes both are changing. What I'd like to do is simply collapse all the different ways of calling spawn_child into two functions, "ap_spawn_child" and "ap_bspawn_child", the latter to handle the BUFF version. It would be a cosmetic fix to make things easier for module authors. Brian --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- pure chewing satisfaction brian@apache.org brian@hyperreal.org From: "RobS" To: Cc: Subject: RE: apache-api/2258: The second arg to spawn_child_err() Date: Tue, 6 Oct 1998 22:21:42 -0400 This PR can be closed. My first suggestion wasn't so hot and my second has been implemented. robs State-Changed-From-To: analyzed-closed State-Changed-By: manoj State-Changed-When: Wed Oct 7 10:47:23 PDT 1998 State-Changed-Why: Closed at user suggestion. His comment (which wasn't copied to apbugs) My first suggestion wasn't so hot and my second has been implemented. >Unformatted: >The second arg to spawn_child_err() changed from "void (*)(void *)" (in 1.2) >to "int(*)(void *)" in (1.3). This should be reflected in compat.h so as >to avoid unneccessary build warnings. You mean warnings with older modules? That's going to be inevitable, as yet another change was introduced into 1.3b7-dev and will be there in 1.3.0: the prototype is now API_EXPORT(int) ap_spawn_child_err(pool *, int (*)(void *, child_info *), void *, enum kill_conditions, FILE **pipe_in, FILE **pipe_out, FILE **pipe_err); This chance was necessary to gracefully (er, well, more gracefully than the alternatives) allow for the different child spawning interface in the Win32 API, which is now being used in 1.3b7 to address some serious problems we've had with MS's lackluster (so say the least) POSIX implementation. So, third-party modules which use spawn_child are going to have to be modified for 1.3 anyways. Also, all third-party modules should use ap_spawn_child_err_buff to be completely safe on NT. > Additionally, calls to spawn_child() should be changed to ap_spawn_child() > for consistency with the conversion to the new namespace. This will > require ap_spawn_child() be defined in alloc.h instead of spawn_child() > (which should be only in compat.h). The current approach is non-intuitive > and sets a bad example. Would be nice to do, it's slightly more complex since spawn_child is a macro but shouldn't be impossible. I'll see about doing it. [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]