[VDPAU] [PATCH] Save the result from secure_getenv

Rémi Denis-Courmont remi at remlab.net
Tue Feb 16 22:22:58 UTC 2016


On Tuesday 16 February 2016 14:18:14 Zach Angold wrote:
> The return value from secure_getenv is not guaranteed to be kept after
> another call to secure_getenv,

AFAIK, it can only "change" if the environment changes. Changing the process 
environment should only be done early in main().

If other threads already exists, it´s undefined behaviour anyway. If libraries 
(e.g. VDPAU) are already initialized, it´s likewise calling for big troubles.

So I don´t really see the point in this patch. If you fear that the 
environment changes, you need atomic access to the environment. And that´s 
essentially not possible with POSIX :-(

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the VDPAU mailing list