libxbps: open fds with O_CLOEXEC to avoid warnings of leaked fds.
This commit is contained in:
@ -89,7 +89,7 @@ xbps_pkgdb_lock(struct xbps_handle *xhp)
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
if ((pkgdb_fd = open(xhp->pkgdb_plist, O_CREAT|O_RDWR, 0664)) == -1) {
|
||||
if ((pkgdb_fd = open(xhp->pkgdb_plist, O_CREAT|O_RDWR|O_CLOEXEC, 0664)) == -1) {
|
||||
rv = errno;
|
||||
xbps_dbg_printf(xhp, "[pkgdb] cannot open pkgdb for locking "
|
||||
"%s: %s\n", xhp->pkgdb_plist, strerror(rv));
|
||||
|
Reference in New Issue
Block a user