Re: [issue #2723] 'diff' output, and handling chdir() in multi-threaded applications
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
> 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!
Received on Sat Mar 3 02:52:40 2007
- application/pgp-signature attachment: stored
This is an archived mail posted to the Subversion Dev