rpms/vixie-cron/devel vixie-cron-4.1-_35-crontab-job-control.patch, NONE, 1.1 vixie-cron.spec, 1.45, 1.46

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Apr 7 17:21:08 UTC 2005


Update of /cvs/dist/rpms/vixie-cron/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv31134

Modified Files:
	vixie-cron.spec 
Added Files:
	vixie-cron-4.1-_35-crontab-job-control.patch 
Log Message:
fix bug 154065: crontab should not use waitpid(...,WUNTRACED) and stop itself if its child is stopped

vixie-cron-4.1-_35-crontab-job-control.patch:
 crontab.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

--- NEW FILE vixie-cron-4.1-_35-crontab-job-control.patch ---
--- vixie-cron-4.1/crontab.c.job_control	2005-04-05 11:45:07.000000000 -0400
+++ vixie-cron-4.1/crontab.c	2005-04-07 13:07:42.851421000 -0400
@@ -463,7 +463,7 @@
 
 	/* parent */
 	for (;;) {
-		xpid = waitpid(pid, &waiter, WUNTRACED);
+		xpid = waitpid(pid, &waiter, 0);
 		if (xpid == -1) {
 			if (errno != EINTR)
 				fprintf(stderr, "%s: waitpid() failed waiting for PID %ld from \"%s\": %s\n",
@@ -472,8 +472,6 @@
 			fprintf(stderr, "%s: wrong PID (%ld != %ld) from \"%s\"\n",
 				ProgramName, (long)xpid, (long)pid, editor);
 			goto fatal;
-		} else if (WIFSTOPPED(waiter)) {
-			kill(getpid(), WSTOPSIG(waiter));
 		} else if (WIFEXITED(waiter) && WEXITSTATUS(waiter)) {
 			fprintf(stderr, "%s: \"%s\" exited with status %d\n",
 				ProgramName, editor, WEXITSTATUS(waiter));


Index: vixie-cron.spec
===================================================================
RCS file: /cvs/dist/rpms/vixie-cron/devel/vixie-cron.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- vixie-cron.spec	5 Apr 2005 15:10:44 -0000	1.45
+++ vixie-cron.spec	7 Apr 2005 17:21:05 -0000	1.46
@@ -7,7 +7,7 @@
 Summary: The Vixie cron daemon for executing specified programs at set times.
 Name: vixie-cron
 Version: 4.1
-Release: 28_FC4
+Release: 30_FC4
 Epoch:   1
 License: distributable
 Group:   System Environment/Base
@@ -49,6 +49,7 @@
 Patch32: vixie-cron-4.1-_32-no_mail_rcpt_safe_p.patch
 Patch33: vixie-cron-4.1-_33-fix_selinux_segfault.patch
 Patch34: vixie-cron-4.1-_34-pam_fail_close_session.patch
+Patch35: vixie-cron-4.1-_35-crontab-job-control.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-root
 Requires: sysklogd >= 1.3.33-6, bash >= 2.0
@@ -114,6 +115,7 @@
 %patch32 -p1 -b .no_mail_rcpt_safe_p
 %patch33 -p1 -b .fix_selinux_segfault
 %patch34 -p1 -b .pam_fail_close_session.patch
+%patch35 -p1 -b .job_control
 
 %build
 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
@@ -171,6 +173,13 @@
 %config(noreplace) /etc/sysconfig/crond
 
 %changelog
+* Thu Apr 07 2005 Jason Vas Dias <jvdias at redhat.com> - 4.1-30_FC4
+- fix bug 154065: crontab's job control broken: by 
+-     xpid = waitpid(pid,&waiter,WUNTRACED);... 
+-     if( WIFSTOPPED(waiter) )... kill(getpid(),WSTOPSIG(waiter));
+- crontab should not kill itself with SIGSTOP if its child
+- gets SIGSTOP; hence it does not need the waitpid WUNTRACED flag.
+ 
 * Tue Apr 05 2005 Jason Vas Dias <jvdias at redhat.com> - 4.1-28_FC4
 - Required for EAL Audit certification: 
 - If pam_setcred should fail, the pam_session could fail to be




More information about the fedora-cvs-commits mailing list