Advanced Programming in the UNIX® Environment
ptg10805159 Section 21.5 Source Code 827 449 nw=write(fd, &req, sizeof(struct printreq)); 450 if (nw != sizeof(struct printr ...
ptg10805159 828 Communicating with a Network Printer Chapter 21 482 /* 483 * Add a worker to the list of worker threads. 484 * 4 ...
ptg10805159 Section 21.5 Source Code 829 520 /* 521 * Cancellation routine for the worker thread. 522 * 523 * LOCKING: acquires ...
ptg10805159 830 Communicating with a Network Printer Chapter 21 549 /* 550 * Deal with signals. 551 * 552 * LOCKING: acquires an ...
ptg10805159 Section 21.5 Source Code 831 581 /* 582 * Add an option to the IPP header. 583 * 584 * LOCKING: none. 585 */ 586 cha ...
ptg10805159 832 Communicating with a Network Printer Chapter 21 608 /* 609 * Single thread to communicate with the printer. 610 ...
ptg10805159 Section 21.5 Source Code 833 641 /* 642 * Check for a change in the config file. 643 */ 644 pthread_mutex_lock(& ...
ptg10805159 834 Communicating with a Network Printer Chapter 21 672 if ((sockfd = connect_retry(AF_INET, SOCK_STREAM, 0, 673 pri ...
ptg10805159 Section 21.5 Source Code 835 699 if (jp->req.flags & PR_TEXT) { 700 p ="text/plain"; 701 extra=1; 702 } else ...
ptg10805159 836 Communicating with a Network Printer Chapter 21 725 /* 726 * Write the headers first. Then send the file. 727 */ ...
ptg10805159 Section 21.5 Source Code 837 754 if (nr < 0) { 755 log_ret("can’t read %s", name); 756 goto defer; 757 } 758 /* 7 ...
ptg10805159 838 Communicating with a Network Printer Chapter 21 786 { 787 ssize_t nr; 788 char *bp = *bpp; 789 int bsz=*bszp; 79 ...
ptg10805159 Section 21.5 Source Code 839 821 success=0; 822 bufsz=IOBUFSZ; 823 if ((bp = malloc(IOBUFSZ)) == NULL) 824 log_sys(" ...
ptg10805159 840 Communicating with a Network Printer Chapter 21 853 /* 854 * HTTP request was okay, but still need to check 855 ...
ptg10805159 Section 21.5 Source Code 841 887 if (i >= datsz) { /* get more header */ 888 if ((nr = readmore(sfd, &bp, i, ...
ptg10805159 842 Communicating with a Network Printer Chapter 21 923 } 924 } 925 hp =(struct ipp_hdr *)cp; 926 i =ntohs(hp->st ...
ptg10805159 Chapter 21 Exercises 843 21.6 Summary This chapter has examined in detail two complete programs: a print spooler dae ...
ptg10805159 This page intentionally left blank ...
ptg10805159 Appendix A. Function Prototypes This appendix contains the function prototypes for the standardISO C, POSIX, and UNI ...
ptg10805159 846 Function Prototypes Appendix A int access(const char *path,intmode); <unistd.h> p. 102 mode:R_OK, W_OK, X_ ...
«
39
40
41
42
43
44
45
46
47
48
»
Free download pdf