[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: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-08-07 07:16:17 CEST

On Aug 6, 2007, at 20:49, Jeremy Pereira wrote:

> On 6 Aug 2007, at 11:19, Ryan Schmidt wrote:
>
>> Yes, the env is empty on UNIX-like systems, but I've heard it
>> reported here before that on Windows the env is not empty. I'd
>> call that a bug; Subversion should empty the env on Windows
>> systems too, to be consistent, and since the Book says the env is
>> empty for security reasons.
>>
>> Can we agree that this is a bug? I couldn't find one filed in the
>> issue tracker.
>
> 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?

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?

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 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 Tue Aug 7 07:15:25 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.