- Updated the CUPS license agreement for the new MacOS
license exception.
+ - The lp and lpr commands now only override the SIGINT
+ handler if it is not being ignored (patch from Robert
+ Ambrose for some interactive software that catches
+ SIGINT and will gracefully cancel the print...)
- The PostScript image filter (imagetops) now supports
printing CMYK images using the CMYK colorspace.
- The image filters now support CMYK JPEG files, and
/*
- * "$Id: lpr.c,v 1.20.2.3 2002/01/02 18:04:19 mike Exp $"
+ * "$Id: lpr.c,v 1.20.2.4 2002/04/22 21:10:25 mike Exp $"
*
* "lpr" command for the Common UNIX Printing System (CUPS).
*
int temp; /* Temporary file descriptor */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Signal action */
+ struct sigaction oldaction; /* Old signal action */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
#ifndef WIN32
# if defined(HAVE_SIGSET)
sigset(SIGHUP, sighandler);
- sigset(SIGINT, sighandler);
+ if (sigset(SIGINT, sighandler) == SIG_IGN)
+ sigset(SIGINT, SIG_IGN);
sigset(SIGTERM, sighandler);
# elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
action.sa_handler = sighandler;
sigaction(SIGHUP, &action, NULL);
- sigaction(SIGINT, &action, NULL);
+ sigaction(SIGINT, NULL, &oldaction);
+ if (oldaction.sa_handler != SIG_IGN)
+ sigaction(SIGINT, &action, NULL);
sigaction(SIGTERM, &action, NULL);
# else
signal(SIGHUP, sighandler);
- signal(SIGINT, sighandler);
+ if (signal(SIGINT, sighandler) == SIG_IGN)
+ signal(SIGINT, SIG_IGN);
signal(SIGTERM, sighandler);
# endif
#endif /* !WIN32 */
/*
- * End of "$Id: lpr.c,v 1.20.2.3 2002/01/02 18:04:19 mike Exp $".
+ * End of "$Id: lpr.c,v 1.20.2.4 2002/04/22 21:10:25 mike Exp $".
*/
/*
- * "$Id: lp.c,v 1.29.2.4 2002/03/22 15:47:31 mike Exp $"
+ * "$Id: lp.c,v 1.29.2.5 2002/04/22 21:10:25 mike Exp $"
*
* "lp" command for the Common UNIX Printing System (CUPS).
*
int temp; /* Temporary file descriptor */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Signal action */
+ struct sigaction oldaction; /* Old signal action */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
#ifndef WIN32
# if defined(HAVE_SIGSET)
sigset(SIGHUP, sighandler);
- sigset(SIGINT, sighandler);
+ if (sigset(SIGINT, sighandler) == SIG_IGN)
+ sigset(SIGINT, SIG_IGN);
sigset(SIGTERM, sighandler);
# elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
action.sa_handler = sighandler;
sigaction(SIGHUP, &action, NULL);
- sigaction(SIGINT, &action, NULL);
+ sigaction(SIGINT, NULL, &oldaction);
+ if (oldaction.sa_handler != SIG_IGN)
+ sigaction(SIGINT, &action, NULL);
sigaction(SIGTERM, &action, NULL);
# else
signal(SIGHUP, sighandler);
- signal(SIGINT, sighandler);
+ if (signal(SIGINT, sighandler) == SIG_IGN)
+ signal(SIGINT, SIG_IGN);
signal(SIGTERM, sighandler);
# endif
#endif /* !WIN32 */
/*
- * End of "$Id: lp.c,v 1.29.2.4 2002/03/22 15:47:31 mike Exp $".
+ * End of "$Id: lp.c,v 1.29.2.5 2002/04/22 21:10:25 mike Exp $".
*/