mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 02:10:27 +00:00
Move ZiposHandle inside __vforked block
This commit is contained in:
parent
440accd4a3
commit
469bfdaab9
1 changed files with 2 additions and 2 deletions
|
@ -31,14 +31,14 @@
|
|||
*/
|
||||
int __zipos_close(int fd) {
|
||||
int rc;
|
||||
struct ZiposHandle *h;
|
||||
h = (struct ZiposHandle *)(intptr_t)g_fds.p[fd].handle;
|
||||
if (!IsWindows()) {
|
||||
rc = sys_close(fd);
|
||||
} else {
|
||||
rc = 0; // no system file descriptor needed on nt
|
||||
}
|
||||
if (!__vforked) {
|
||||
struct ZiposHandle *h;
|
||||
h = (struct ZiposHandle *)(intptr_t)g_fds.p[fd].handle;
|
||||
__zipos_free(h);
|
||||
}
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue