Lines Matching defs:cwd
39 int cwd = -1;
44 /* Remember cwd */
45 if ((cwd = open(".", O_RDONLY)) < 0) {
46 LOG(log_error, logtype_cnid, "error opening cwd: %s", strerror(errno));
67 if (cwd != -1) {
68 if (fchdir(cwd) != 0) {
72 close(cwd);
238 int cwd = -1;
244 /* Remember cwd */
245 if ((cwd = open(".", O_RDONLY)) < 0) {
246 LOG(log_error, logtype_cnid, "error opening cwd: %s", strerror(errno));
266 if (cwd != -1) {
267 if ((fchdir(cwd)) != 0) {
271 close(cwd);
280 int cwd = -1;
288 /* Remember cwd */
289 if ((cwd = open(".", O_RDONLY)) < 0) {
290 LOG(log_error, logtype_cnid, "error opening cwd: %s", strerror(errno));
319 if (cwd != -1) {
320 if ((fchdir(cwd)) != 0) {
324 close(cwd);
592 int ret, i, cwd;
599 /* Remember cwd */
600 if ((cwd = open(".", O_RDONLY)) < 0) {
601 LOG(log_error, logtype_cnid, "error opening cwd: %s", strerror(errno));
632 if ((fchdir(cwd)) != 0) {