Advanced Programming in the UNIX® Environment
ptg10805159 Section 19.4 pty_forkFunction 727 #include "apue.h" #include <termios.h> pid_t pty_fork(int *ptrfdm,char *slav ...
ptg10805159 728 Pseudo Terminals Chapter 19 pid_t pid; char pts_name[20]; if ((fdm = ptym_open(pts_name, sizeof(pts_name))) < ...
ptg10805159 Section 19.5 ptyProgram 729 if (dup2(fds, STDOUT_FILENO) != STDOUT_FILENO) err_sys("dup2 error to stdout"); if (dup2 ...
ptg10805159 730 Pseudo Terminals Chapter 19 struct termios orig_termios; struct winsize size; interactive = isatty(STDIN_FILENO) ...
ptg10805159 Section 19.5 ptyProgram 731 }else if (pid == 0) { /* child */ if (noecho) set_noecho(STDIN_FILENO); /* stdin is slav ...
ptg10805159 732 Pseudo Terminals Chapter 19 Beforecalling pty_fork, we fetch the current values for the termios and winsizestruc ...
ptg10805159 Section 19.6 Using theptyProgram 733 if (signal_intr(SIGTERM, sig_term) == SIG_ERR) err_sys("signal_intr error for S ...
ptg10805159 734 Pseudo Terminals Chapter 19 $who sar console May 19 16:47 sar ttys000 May 19 16:47 sar ttys001 May 19 16:48 sar ...
ptg10805159 Section 19.6 Using theptyProgram 735 terminal device driver PTY master PTY slave terminal line discipline terminal l ...
ptg10805159 736 Pseudo Terminals Chapter 19 pty slowout > file.out & theptyprocess is stopped immediately when the child ...
ptg10805159 Section 19.6 Using theptyProgram 737 In this example, we assume that theSHELL variable is the Korn shell (probably / ...
ptg10805159 738 Pseudo Terminals Chapter 19 isattyreturns false. This means that the line discipline above the actual terminal r ...
ptg10805159 Section 19.6 Using theptyProgram 739 When we run thetelnetprogram interactively, we wait for the remote host to prom ...
ptg10805159 740 Pseudo Terminals Chapter 19 err_sys("dup2 error to stdout"); if (pipe[0] != STDIN_FILENO && pipe[0] != S ...
ptg10805159 Section 19.8 Summary 741 Regardless of the implementation details, the purpose of packet mode is to inform the proce ...
ptg10805159 742 Pseudo Terminals Chapter 19 Exercises 19.1 When we remotely log in to a BSD system using eithertelnetorrlogin,th ...
ptg10805159 20 ADatabase Library 20.1 Introduction During the early 1980s, the UNIX System was considered a hostile environment ...
ptg10805159 744 ADatabase Library Chapter 20 provided in SVR4’s BSD-compatibility library [AT&T 1990c]. The BSD developers e ...
ptg10805159 Section 20.3 The Library 745 #include "apue_db.h" DBHANDLE db_open(const char *pathname,intoflag,... /* intmode*/); ...
ptg10805159 746 ADatabase Library Chapter 20 #include "apue_db.h" int db_delete(DBHANDLEdb,const char *key); Returns: 0 if OK,−1 ...
«
34
35
36
37
38
39
40
41
42
43
»
Free download pdf