lpd.c (117587) | lpd.c (118881) |
---|---|
1/* 2 * Copyright (c) 1983, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95"; 44#endif /* not lint */ 45#endif 46 47#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ | 1/* 2 * Copyright (c) 1983, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95"; 44#endif /* not lint */ 45#endif 46 47#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ |
48__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 117587 2003-07-14 19:59:33Z gad $"); | 48__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 118881 2003-08-13 20:31:33Z gad $"); |
49 50/* 51 * lpd -- line printer daemon. 52 * 53 * Listen for a connection and perform the requested operation. 54 * Operations are: 55 * \1printer\n 56 * check the queue for jobs and print any found. --- 348 unchanged lines hidden (view full) --- 405 signal(SIGINT, SIG_IGN); 406 signal(SIGQUIT, SIG_IGN); 407 signal(SIGTERM, SIG_IGN); 408 (void) close(funix); 409 if (sflag == 0 && finet) { 410 for (i = 1; i <= *finet; i++) 411 (void)close(finet[i]); 412 } | 49 50/* 51 * lpd -- line printer daemon. 52 * 53 * Listen for a connection and perform the requested operation. 54 * Operations are: 55 * \1printer\n 56 * check the queue for jobs and print any found. --- 348 unchanged lines hidden (view full) --- 405 signal(SIGINT, SIG_IGN); 406 signal(SIGQUIT, SIG_IGN); 407 signal(SIGTERM, SIG_IGN); 408 (void) close(funix); 409 if (sflag == 0 && finet) { 410 for (i = 1; i <= *finet; i++) 411 (void)close(finet[i]); 412 } |
413 dup2(s, 1); | 413 dup2(s, STDOUT_FILENO); |
414 (void) close(s); 415 if (domain == AF_INET) { 416 /* for both AF_INET and AF_INET6 */ 417 from_remote = 1; 418 chkhost((struct sockaddr *)&frominet, 419 ch_options); 420 } else 421 from_remote = 0; --- 525 unchanged lines hidden --- | 414 (void) close(s); 415 if (domain == AF_INET) { 416 /* for both AF_INET and AF_INET6 */ 417 from_remote = 1; 418 chkhost((struct sockaddr *)&frominet, 419 ch_options); 420 } else 421 from_remote = 0; --- 525 unchanged lines hidden --- |