forked from len0rd/rockbox
hosted: Use O_CLOEXEC for all open() and "e" for fopen() calls
This way we'll automatically close the files upon exec() Change-Id: Ic0daca8fb56432830de4a2f4a86a77337121ecc7
This commit is contained in:
parent
4f8736909a
commit
5cfd3ae4e6
14 changed files with 27 additions and 31 deletions
|
@ -234,6 +234,7 @@ int app_open(const char *path, int oflag, ...)
|
|||
if (!fpath)
|
||||
FILE_ERROR_RETURN(ENAMETOOLONG, -1);
|
||||
|
||||
oflag |= O_CLOEXEC;
|
||||
return os_open(fpath, oflag __OPEN_MODE_ARG);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue