diff options
Diffstat (limited to 'src')
| -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 | } |