[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: hook script basics

From: Jeremy Pereira <jeremyp_at_jeremyp.net>
Date: 2007-08-08 03:32:27 CEST

On 7 Aug 2007, at 14:16, Ryan Schmidt wrote:

>
> On Aug 6, 2007, at 20:49, Jeremy Pereira wrote:
>
>>
>> If it is a bug, it's an APR bug. Subversion passes a null
>> environment pointer to apr_proc_create and my cursory inspection
>> of the Windows and Unix versions of this function is that the
>> semantics are different.
>>
>> On Unix, if the environment pointer is null, a pointer to an empty
>> array is passed to the exec call (i.e. an array initialised thus:
>> { NULL }). In the Windows version of the call, it appears that a
>> null pointer is passed to CreateProcW. Here's the Microsoft
>> documentation for the environment parameter:
>>
>> "[in] A pointer to the environment block for the new process. If
>> this parameter is NULL, the new process uses the environment of
>> the calling process."
>>
>> http://msdn2.microsoft.com/en-us/library/ms682425.aspx
>
> Thanks for finding that. Is there equivalent information for UNIX-
> like operating systems?

man 3 exec

>
> I'm not familiar with the way APR works or is supposed to work.
> This page does not specify what the behavior is supposed to be when
> the env is null:
>
> http://apr.apache.org/docs/apr/1.2/
> group__apr__thread__proc.html#gb51dd90b98d365a969f0ec5c7bef4e14
>
> Is there any other APR documentation?

Don't know. I just got curious and rummaged around the Subversion
and APR code for 10 minutes.

>
> I assume, though, that APR functions should generally behave the
> same on all platforms, due to the word "portable" in the project's
> name.

I would assume the same, but I don't think that is a correct
assumption for apr_proc_create. I must emphasise that I might be
missing something, as I said I only spent a few minutes on it.

I think the sbuversion devs could work around the problem by passing
a pointer to an empty null terminated array instead of a null pointer.

>
> I searched the Apache bugzilla for "apr_proc_create" and didn't
> find anything that looked relevant.
>
> Is there someone already on the APR list who could ask them? Or
> should we just submit a bug report?
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 8 03:31:48 2007

This is an archived mail posted to the Subversion Users mailing list.