bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Openat without die


From: Jim Meyering
Subject: Re: Openat without die
Date: Tue, 11 Jan 2011 17:41:49 +0100

Bastien ROUCARIES wrote:
> This two patches will allow to remove a xmalloc and bail out early in
> case of ENOMEM
>
> I plan to implement a API reusing openat_permissive()
>
> If openat_permissive cwd_errno is NULL use the slow but safe fork variant
> else use the fchdir variant

Is openat_permissive a variable, a cpp symbol?
Is cwd_errno a global variable?
Where would they be set?

> Program that care could therefore use the more permissive variant
> (like for instance the critical fts without FTS_NOCHDIR)
>
> I program also to implement *at_permissive function
>
> What do you think about that?
>
> How could I easilly test this fallback under my quite recent debian ?
>
> Does I need to compile under a qemu image of old os ? Where
> could I find such an os ?

If I understand your proposal, you'll have to make every *at function
call fork on those less-functional systems (the ones lacking e.g., openat).
How will that be feasible (wrt efficiency), in general?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]