Deleted Added
full compact
lpd.c (78749) lpd.c (79735)
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:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
44#endif
45static const char rcsid[] =
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:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
44#endif
45static const char rcsid[] =
46 "$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 78749 2001-06-25 01:45:25Z gad $";
46 "$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 79735 2001-07-14 21:49:17Z gad $";
47#endif /* not lint */
48
49/*
50 * lpd -- line printer daemon.
51 *
52 * Listen for a connection and perform the requested operation.
53 * Operations are:
54 * \1printer\n

--- 307 unchanged lines hidden (view full) ---

362 }
363 }
364 if (s < 0) {
365 if (errno != EINTR)
366 syslog(LOG_WARNING, "accept: %m");
367 continue;
368 }
369 if (fork() == 0) {
47#endif /* not lint */
48
49/*
50 * lpd -- line printer daemon.
51 *
52 * Listen for a connection and perform the requested operation.
53 * Operations are:
54 * \1printer\n

--- 307 unchanged lines hidden (view full) ---

362 }
363 }
364 if (s < 0) {
365 if (errno != EINTR)
366 syslog(LOG_WARNING, "accept: %m");
367 continue;
368 }
369 if (fork() == 0) {
370 signal(SIGCHLD, SIG_IGN);
370 /*
371 * Note that printjob() also plays around with
372 * signal-handling routines, and may need to be
373 * changed when making changes to signal-handling.
374 */
375 signal(SIGCHLD, SIG_DFL);
371 signal(SIGHUP, SIG_IGN);
372 signal(SIGINT, SIG_IGN);
373 signal(SIGQUIT, SIG_IGN);
374 signal(SIGTERM, SIG_IGN);
375 (void) close(funix);
376 if (pflag == 0 && finet) {
377 for (i = 1; i <= *finet; i++)
378 (void)close(finet[i]);

--- 513 unchanged lines hidden ---
376 signal(SIGHUP, SIG_IGN);
377 signal(SIGINT, SIG_IGN);
378 signal(SIGQUIT, SIG_IGN);
379 signal(SIGTERM, SIG_IGN);
380 (void) close(funix);
381 if (pflag == 0 && finet) {
382 for (i = 1; i <= *finet; i++)
383 (void)close(finet[i]);

--- 513 unchanged lines hidden ---