-CHANGES.txt - 2011-05-11
+CHANGES.txt - 2011-05-18
------------------------
CHANGES IN CUPS V1.5b1
+ - The scheduler now sets the process group for child processes and
+ manages the group (STR #2829)
- Fixed some minor issues discovered by a Coverity scan (STR #3838)
- The scheduler now more carefully creates and removes configuration,
cache, and state files (STR #3715)
dnl Check for geteuid function.
AC_CHECK_FUNCS(geteuid)
+dnl Check for setpgid function.
+AC_CHECK_FUNCS(setpgid)
+
dnl Check for vsyslog function.
AC_CHECK_FUNCS(vsyslog)
#undef HAVE_GETEUID
+/*
+ * Do we have the setpgid() function?
+ */
+
+#undef HAVE_SETPGID
+
+
/*
* Do we have the vsyslog() function?
*/
if (!pid)
return (0);
else if (force)
- return (kill(pid, SIGKILL));
+ return (kill(-pid, SIGKILL));
else
- return (kill(pid, SIGTERM));
+ return (kill(-pid, SIGTERM));
}
if (!root)
nice(FilterNice);
+ /*
+ * Put this process in its own process group so that we can kill any child
+ * processes it creates.
+ */
+
+#ifdef HAVE_SETPGID
+ if (setpgid(0, 0))
+ exit(errno);
+#else
+ if (setpgrp())
+ exit(errno);
+#endif /* HAVE_SETPGID */
+
/*
* Change user to something "safe"...
*/
/* #undef HAVE_GETEUID */
+/*
+ * Do we have the setpgid() function?
+ */
+
+/* #undef HAVE_SETPGID */
+
+
/*
* Do we have the vsyslog() function?
*/
#define HAVE_GETEUID 1
+/*
+ * Do we have the setpgid() function?
+ */
+
+#define HAVE_SETPGID 1
+
+
/*
* Do we have the vsyslog() function?
*/