diff options
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/callproc.c b/src/callproc.c index c7bbe36e605..c9a504746b3 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1317,16 +1317,7 @@ relocate_fd (int fd, int minfd) | |||
| 1317 | return fd; | 1317 | return fd; |
| 1318 | else | 1318 | else |
| 1319 | { | 1319 | { |
| 1320 | int new; | 1320 | int new = fcntl (fd, F_DUPFD, minfd); |
| 1321 | #ifdef F_DUPFD | ||
| 1322 | new = fcntl (fd, F_DUPFD, minfd); | ||
| 1323 | #else | ||
| 1324 | new = dup (fd); | ||
| 1325 | if (new != -1) | ||
| 1326 | /* Note that we hold the original FD open while we recurse, | ||
| 1327 | to guarantee we'll get a new FD if we need it. */ | ||
| 1328 | new = relocate_fd (new, minfd); | ||
| 1329 | #endif | ||
| 1330 | if (new == -1) | 1321 | if (new == -1) |
| 1331 | { | 1322 | { |
| 1332 | const char *message_1 = "Error while setting up child: "; | 1323 | const char *message_1 = "Error while setting up child: "; |
| @@ -1576,15 +1567,13 @@ init_callproc (void) | |||
| 1576 | #endif | 1567 | #endif |
| 1577 | { | 1568 | { |
| 1578 | tempdir = Fdirectory_file_name (Vexec_directory); | 1569 | tempdir = Fdirectory_file_name (Vexec_directory); |
| 1579 | if (access (SSDATA (tempdir), 0) < 0) | 1570 | if (! file_accessible_directory_p (SSDATA (tempdir))) |
| 1580 | dir_warning ("Warning: arch-dependent data dir (%s) does not exist.\n", | 1571 | dir_warning ("arch-dependent data dir", Vexec_directory); |
| 1581 | Vexec_directory); | ||
| 1582 | } | 1572 | } |
| 1583 | 1573 | ||
| 1584 | tempdir = Fdirectory_file_name (Vdata_directory); | 1574 | tempdir = Fdirectory_file_name (Vdata_directory); |
| 1585 | if (access (SSDATA (tempdir), 0) < 0) | 1575 | if (! file_accessible_directory_p (SSDATA (tempdir))) |
| 1586 | dir_warning ("Warning: arch-independent data dir (%s) does not exist.\n", | 1576 | dir_warning ("arch-independent data dir", Vdata_directory); |
| 1587 | Vdata_directory); | ||
| 1588 | 1577 | ||
| 1589 | sh = (char *) getenv ("SHELL"); | 1578 | sh = (char *) getenv ("SHELL"); |
| 1590 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); | 1579 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); |
| @@ -1593,7 +1582,7 @@ init_callproc (void) | |||
| 1593 | Vshared_game_score_directory = Qnil; | 1582 | Vshared_game_score_directory = Qnil; |
| 1594 | #else | 1583 | #else |
| 1595 | Vshared_game_score_directory = build_string (PATH_GAME); | 1584 | Vshared_game_score_directory = build_string (PATH_GAME); |
| 1596 | if (NILP (Ffile_directory_p (Vshared_game_score_directory))) | 1585 | if (NILP (Ffile_accessible_directory_p (Vshared_game_score_directory))) |
| 1597 | Vshared_game_score_directory = Qnil; | 1586 | Vshared_game_score_directory = Qnil; |
| 1598 | #endif | 1587 | #endif |
| 1599 | } | 1588 | } |