diff options
| author | Karl Heuer | 1996-01-08 22:34:43 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-01-08 22:34:43 +0000 |
| commit | 7ac098ffa96fa2f2828eebe488053eb1183c10be (patch) | |
| tree | fc17095b01c0c843a4ae241b39b40eae84ac4c94 /src/s | |
| parent | 48240339243662c5f0f0191c82c0f8de4361f1e1 (diff) | |
| download | emacs-7ac098ffa96fa2f2828eebe488053eb1183c10be.tar.gz emacs-7ac098ffa96fa2f2828eebe488053eb1183c10be.zip | |
(PTY_TTY_NAME_SPRINTF): Make failure non-fatal.
Diffstat (limited to 'src/s')
| -rw-r--r-- | src/s/sol2-3.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/s/sol2-3.h b/src/s/sol2-3.h index 2e5d068d193..9d9018aa0be 100644 --- a/src/s/sol2-3.h +++ b/src/s/sol2-3.h | |||
| @@ -35,16 +35,16 @@ | |||
| 35 | #undef PTY_TTY_NAME_SPRINTF | 35 | #undef PTY_TTY_NAME_SPRINTF |
| 36 | #define PTY_TTY_NAME_SPRINTF \ | 36 | #define PTY_TTY_NAME_SPRINTF \ |
| 37 | { \ | 37 | { \ |
| 38 | char *ptsname(), *ptyname; \ | 38 | char *ptsname (), *ptyname; \ |
| 39 | \ | 39 | \ |
| 40 | sigblock(sigmask(SIGCLD)); \ | 40 | sigblock (sigmask (SIGCLD)); \ |
| 41 | if (grantpt(fd) == -1) \ | 41 | if (grantpt (fd) == -1) \ |
| 42 | fatal("could not grant slave pty"); \ | 42 | { close (fd); return -1; } \ |
| 43 | sigunblock(sigmask(SIGCLD)); \ | 43 | sigunblock (sigmask (SIGCLD)); \ |
| 44 | if (unlockpt(fd) == -1) \ | 44 | if (unlockpt (fd) == -1) \ |
| 45 | fatal("could not unlock slave pty"); \ | 45 | { close (fd); return -1; } \ |
| 46 | if (!(ptyname = ptsname(fd))) \ | 46 | if (!(ptyname = ptsname (fd))) \ |
| 47 | fatal ("could not enable slave pty"); \ | 47 | { close (fd); return -1; } \ |
| 48 | strncpy(pty_name, ptyname, sizeof(pty_name)); \ | 48 | strncpy (pty_name, ptyname, sizeof (pty_name)); \ |
| 49 | pty_name[sizeof(pty_name) - 1] = 0; \ | 49 | pty_name[sizeof (pty_name) - 1] = 0; \ |
| 50 | } | 50 | } |