[PATCH xinit 02/14] Simplify environment juggling by using fork() instead of vfork()

Alan Coopersmith alan.coopersmith at oracle.com
Tue Apr 13 16:31:50 PDT 2010


Mikhail Gusarov wrote:
> +    if (!setenv("WINDOWPATH", newwindowpath, TRUE))
> +        fprintf(stderr, "%s:  unable to set WINDOWPATH\n", program);

When I built and tried running it, this always reported a bogus error
until I changed it to:
    if (setenv("WINDOWPATH", newwindowpath, TRUE) != 0)
        Error("unable to set WINDOWPATH");

since setenv() on Solaris at least returns 0 for success, -1 for failure.

Other than that, with the entire series of 14 applied, everything seemed
to build and work fine, and the code changes looked good on review, so

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list