Advanced Programming in the UNIX® Environment
ptg10805159 Section 18.11Noncanonical Mode 707 *Output processing off. */ buf.c_oflag &= ̃(OPOST); /* *Case B: 1 byte at a t ...
ptg10805159 708 Te rminal I/O Chapter 18 void tty_atexit(void) /* can be set up by atexit(tty_atexit) */ { if (ttysavefd >= 0 ...
ptg10805159 Section 18.11Noncanonical Mode 709 #include "apue.h" static void sig_catch(int signo) { printf("signal caught\n"); t ...
ptg10805159 710 Te rminal I/O Chapter 18 Running the program in Figure18.21, we can see what happens with these two terminal mod ...
ptg10805159 Section 18.12 Te rminal Window Size 711 •Other than storing the current value of the structureand generating a signa ...
ptg10805159 712 Te rminal I/O Chapter 18 Running the program in Figure18.22 on a windowed terminal gives us $./a.out 35 rows, 80 ...
ptg10805159 Chapter 18 Exercises 713 to perform typical operations (clear the screen, move the cursor) on a wide variety of term ...
ptg10805159 This page intentionally left blank ...
ptg10805159 19 Pseudo Ter minals 19.1 Introduction In Chapter 9, we saw that terminal logins come in through a terminal device, ...
ptg10805159 716 Pseudo Terminals Chapter 19 read and write functions terminal line discipline pseudo terminal slave pseudo termi ...
ptg10805159 Section 19.2 Overview 717 stream head ttcompat STREAMSmodule ldterm STREAMSmodule ptem STREAMSmodule pseudo terminal ...
ptg10805159 718 Pseudo Terminals Chapter 19 network device driver PTY master PTY slave TCP/IP line disciplineterminal kernel rlo ...
ptg10805159 Section 19.2 Overview 719 window manager terminal emulator shell PTY master terminal line discipline PTY slave shell ...
ptg10805159 720 Pseudo Terminals Chapter 19 terminal device driver PTY master PTY slave terminal line discipline terminal line d ...
ptg10805159 Section 19.2 Overview 721 Running Coprocesses In the coprocess example in Figure15.19, we couldn’t invoke a coproces ...
ptg10805159 722 Pseudo Terminals Chapter 19 terminal device driver PTY master PTY slave terminal line discipline terminal line d ...
ptg10805159 Section 19.3 Opening Pseudo-Terminal Devices 723 Theoflagargument is a bitmask that specifies how the master device ...
ptg10805159 724 Pseudo Terminals Chapter 19 On FreeBSD,grantptandunlockptdo nothing other than argument validation; the PTYs are ...
ptg10805159 Section 19.3 Opening Pseudo-Terminal Devices 725 int ptym_open(char *pts_name, int pts_namesz) { char *ptr; int fdm, ...
ptg10805159 726 Pseudo Terminals Chapter 19 if (ioctl(fds, I_PUSH, "ttcompat") < 0) { errout: err = errno; close(fds); errno ...
«
33
34
35
36
37
38
39
40
41
42
»
Free download pdf