Re: openat, failing fchdir

2010-12-23 Thread Bastien ROUCARIES
Le jeudi 23 décembre 2010 18:58:37, vous avez écrit : > On 12/23/2010 10:44 AM, Bastien ROUCARIES wrote: > > Bastien, can you please convince your mailer to preserve threading? (sorry was on a long day train run and could only use the crappy android client) > > For cygwin and windows plateform s

Re: RE : Re: openat, failing fchdir

2010-12-23 Thread Eric Blake
On 12/23/2010 10:44 AM, Bastien ROUCARIES wrote: Bastien, can you please convince your mailer to preserve threading? Thanks. > For cygwin and windows plateform see ntcreatefile that allow to open an > handle relativly to another handle Yes, cygwin's already using that. Whether it makes sense t

RE : Re: openat, failing fchdir

2010-12-23 Thread Bastien ROUCARIES
Dear bruce, See my attempt to provide program name under aix hpux and irix, If you could test it, i could help you Btw instead of creating our own interface why not use the well known bsd interface? Getprogname() and setprogname()? Bastien Le 23 déc. 2010 18:19, "Bruce Korb" a écrit : On 12

RE : Re: openat, failing fchdir

2010-12-23 Thread Bastien ROUCARIES
For cygwin and windows plateform see ntcreatefile that allow to open an handle relativly to another handle Bastien Le 23 déc. 2010 15:52, "Eric Blake" a écrit : On 12/23/2010 05:08 AM, Bruno Haible wrote: > Bastien ROUCARIES wrote: >> If chdir is a problem, why... Unfortunately, it is not possi

Re: openat, failing fchdir

2010-12-23 Thread Bruce Korb
On 12/23/10 06:52, Eric Blake wrote: > Unfortunately, it is not possible to pass fds on cygwin; it is not > possible to implement SCM_RIGHTS on top of what Windows provides. Then > again, cygwin's *at functions don't need replacing, so it's a moot > point. The whole exercise here is how to cater

Re: openat, failing fchdir

2010-12-23 Thread Eric Blake
On 12/23/2010 05:08 AM, Bruno Haible wrote: > Bastien ROUCARIES wrote: >> If chdir is a problem, why not using a heavy weight approach (better safe >> than sorry particularly if gnulib is used for a lot of project): >> - fork and exec an helper for name resolution >> - pass fd using a socket >> >>

Re: openat, failing fchdir

2010-12-23 Thread Bruno Haible
Bastien ROUCARIES wrote: > If chdir is a problem, why not using a heavy weight approach (better safe > than sorry particularly if gnulib is used for a lot of project): > - fork and exec an helper for name resolution > - pass fd using a socket > > It is really heavy but it is on the safe side I li

Re: openat, failing fchdir

2010-12-23 Thread Bruno Haible
Hi Paul, > > For example, if save_cwd called > > currdir_fd = open ("."); > > then on a platform that supports fchdir() natively [not gnulib's > > emulation], a failure to do fchdir (currdir_fd) is of type (a). > > It can only occur if some other part of the program did side > > effects on cur