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

Re: [issue #2723] 'diff' output, and handling chdir() in multi-threaded applications

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-03-03 02:47:26 CET

On Fri, 02 Mar 2007, Nicolás Lichtmaier wrote:

>
> >I'd like to be able to provide some control over the appearance of the
> >paths used in the diff output to Subclipse and other consumers of our
> >client APIs. Currently, the only way I can see to provide this
> >control for relative paths is to chdir() to the appropriate directory
> >before running 'diff'. (I have a patch implementing this which works
> >fine.)
>
> As it was correctly pointed out, chaidr() is totally MT unsafe. But why
> do you needi to chdir the *parent* process? You need to chdir in the
> *forked* process before exec(). In Windows, CreateProcess receives the
> cwd for the new process as a parameter. APR must have handle this
> (haven't checked).

I'm concerned about the case where no process is explicitly forked.
I'm also concerned about the case where code is being called from a
JVM or similar environment which doesn't even have access to chdir()
(meaning I need to provide an applicable native API).

Thanks for the feedback!

- Dan

  • application/pgp-signature attachment: stored
Received on Sat Mar 3 02:52:40 2007

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

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