diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-10-26 18:06:18 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-10-26 18:12:25 -0400 |
commit | 3437e478ba932edbab18a90638c20be1f0141156 (patch) | |
tree | 8da34b267c3980cd633be6387b7dc1a2ec73f4f3 /src/temp/mktemp.c | |
parent | 2d0bbe6c788938d1332609c014eeebc1dff966ac (diff) | |
download | musl-3437e478ba932edbab18a90638c20be1f0141156.tar.gz musl-3437e478ba932edbab18a90638c20be1f0141156.tar.xz musl-3437e478ba932edbab18a90638c20be1f0141156.zip |
fix reintroduction of errno clobbering by atfork handlers
commit bd153422f28634bb6e53f13f80beb8289d405267 reintroduced the bug fixed in c21051e90cd27a0b26be0ac66950b7396a156ba1 by refactoring the __syscall_ret into _Fork where it once again runs before the atfork handlers are called. since _Fork is a public interface that sets errno, this can't be fixed the way it was fixed last time without making new internal interfaces. instead, just save errno, and restore it only on error to ensure that a value of 0 is never restored.
Diffstat (limited to 'src/temp/mktemp.c')
0 files changed, 0 insertions, 0 deletions