NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/58809: pkg_add gets confused with -P and library installs
The following reply was made to PR bin/58809; it has been noted by GNATS.
From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/58809: pkg_add gets confused with -P and library installs
Date: Tue, 5 Nov 2024 20:32:15 +0000 (UTC)
> + if (getcwd(orig_cwd, sizeof(orig_cwd)) == NULL) {
> + warn("Can't get current working directory");
> + return -1;
> + }
> +
> [...]
> + chdir(orig_cwd);
> +
>
Save a buffer by doing:
```
fd = open(".", O_RDONLY|O_CLOEXEC|O_DIRECTORY);
...
fchdir(fd);
```
?
(precedent in pfcexec():pkg_install/dist/lib/fexec.c)
-RVP
Home |
Main Index |
Thread Index |
Old Index