rpms/at/devel at-3.1.10-session.patch, NONE, 1.1 at.spec, 1.56, 1.57 atd.init, 1.4, 1.5
Marcela Mašláňová (mmaslano)
fedora-extras-commits at redhat.com
Thu Jul 12 11:21:58 UTC 2007
Author: mmaslano
Update of /cvs/pkgs/rpms/at/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13818
Modified Files:
at.spec atd.init
Added Files:
at-3.1.10-session.patch
Log Message:
Add patch
at-3.1.10-session.patch:
--- NEW FILE at-3.1.10-session.patch ---
--- at-3.1.10/atd.c.old 2007-07-12 11:12:36.000000000 +0200
+++ at-3.1.10/atd.c 2007-07-12 11:20:40.000000000 +0200
@@ -303,6 +303,8 @@
free(newname);
return;
}
+ (void) setsid(); //own session for process
+
/* Let's see who we mail to. Hopefully, we can read it from
* the command file; if not, send it to the owner, or, failing that,
* to root.
Index: at.spec
===================================================================
RCS file: /cvs/pkgs/rpms/at/devel/at.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- at.spec 9 Jul 2007 13:56:09 -0000 1.56
+++ at.spec 12 Jul 2007 11:21:21 -0000 1.57
@@ -6,7 +6,7 @@
Summary: Job spooling tools
Name: at
Version: 3.1.10
-Release: 14%{?dist}
+Release: 15%{?dist}
License: GPL
Group: System Environment/Daemons
URL: http://ftp.debian.org/debian/pool/main/a/at
@@ -26,6 +26,7 @@
Patch9: at-3.1.10-dont_fork.patch
Patch10: at-3.1.10-perm.patch
Patch11: at-3.1.10-opt_V.patch
+Patch12: at-3.1.10-session.patch
BuildRequires: fileutils chkconfig /etc/init.d
BuildRequires: flex bison autoconf
@@ -71,6 +72,7 @@
%patch9 -p1 -b .dont_fork
%patch10 -p1 -b .perm
%patch11 -p1 -b .opt_V
+%patch12 -p1 -b .session
%build
# patch10 touches configure.in
@@ -173,6 +175,11 @@
%attr(4755,root,root) %{_bindir}/at
%changelog
+* Tue Jul 11 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-15
+- rewrite init script
+- add own session - setsid
+- Resolves: rhbz#247091
+
* Tue Jul 9 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-14
- feature: add configuration file
- fix -V option
Index: atd.init
===================================================================
RCS file: /cvs/pkgs/rpms/at/devel/atd.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- atd.init 9 Jul 2007 13:56:09 -0000 1.4
+++ atd.init 12 Jul 2007 11:21:21 -0000 1.5
@@ -21,24 +21,27 @@
ATD=/usr/sbin/atd
LOCK_FILE=/var/lock/subsys/atd
-prog="atd"
-
+[ -f /etc/sysconfig/atd ] || exit 6
+
start() {
# Check if atd is already running
- echo -n $"Starting $prog: "
- ##daemon /usr/sbin/atd
- $ATD $OPTIONS && success || failure
- RETVAL=$?
- [ "$RETVAL" = 0 ] && touch $LOCK_FILE
- echo
+ echo -n $"Starting $prog: "
+ $ATD $OPTIONS && success || failure
+ RETVAL=$?
+ [ "$RETVAL" = 0 ] && touch $LOCK_FILE
+ echo
}
stop() {
echo -n $"Stopping $prog: "
- killproc $ATD
- RETVAL=$?
- [ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
- echo
+ if [ -n "`pidfileofproc $ATD`" ] ; then
+ killproc $ATD
+ else
+ failure $"Stopping $prog"
+ fi
+ RETVAL=$?
+ [ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
+ echo
}
@@ -74,7 +77,7 @@
;;
condrestart)
if [ -f $LOCK_FILE ]; then
- if [ "$RETVAL" = 0]; then
+ if [ "$RETVAL" = 0 ]; then
stop
sleep 3
start
@@ -86,6 +89,6 @@
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
- RETVAL=1
+ RETVAL=3
esac
exit $RETVAL
More information about the scm-commits
mailing list