rpms/at/devel at-3.1.8-dontfork.patch,NONE,1.1 at.spec,1.38,1.39
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Aug 23 11:46:35 UTC 2006
Author: mmaslano
Update of /cvs/dist/rpms/at/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26178
Modified Files:
at.spec
Added Files:
at-3.1.8-dontfork.patch
Log Message:
Added don't fork option.
at-3.1.8-dontfork.patch:
atd.8.in | 6 +++++-
daemon.c | 8 ++++++--
daemon.h | 2 ++
3 files changed, 13 insertions(+), 3 deletions(-)
--- NEW FILE at-3.1.8-dontfork.patch ---
--- at-3.1.8/daemon.c.dontfork 2002-01-18 05:15:27.000000000 +0100
+++ at-3.1.8/daemon.c 2006-08-23 12:13:11.000000000 +0200
@@ -50,7 +50,8 @@
static char rcsid[] = "$Id: daemon.c,v 1.9 1996/08/12 08:23:55 ig25 Exp $";
-int daemon_debug;
+int daemon_debug = 0;
+int daemon_nofork = 0;
static int
lock_fd(int fd)
@@ -119,15 +120,18 @@
(open("/dev/null", O_RDWR) != 2)) {
perr("Error redirecting I/O");
}
+ }
+ if (daemon_nofork) pid = getpid();
+ else {
pid = fork();
if (pid == -1) {
perr("Cannot fork");
} else if (pid != 0) {
exit(0);
}
+ (void) setsid();
}
old_umask = umask(S_IWGRP | S_IWOTH);
- (void) setsid();
PRIV_START
--- at-3.1.8/atd.8.in.dontfork 2002-01-18 08:41:03.000000000 +0100
+++ at-3.1.8/atd.8.in 2006-08-23 12:18:38.000000000 +0200
@@ -1,5 +1,5 @@
.Id $Id: atd.8.in,v 1.6 1997/09/28 20:00:26 ig25 Exp $
-.TH ATD 8 "Mar 1997" local "Linux Programmer's Manual"
+.TH ATD "8" "Mar 1997" "at-3.1.8" "Linux Programmer's Manual"
.SH NAME
atd \- run jobs queued for later execution
.SH SYNOPSIS
@@ -10,6 +10,7 @@
.IR batch_interval ]
.RB [ -d ]
.RB [ -s ]
+.RB [ -n ]
.SH DESCRIPTION
.B atd
runs jobs queued by
@@ -46,6 +47,9 @@
is installed as
.B @prefix@/sbin/atrun
for backward compatibility.
+.TP 8
+.B -n
+Don't fork option.
.SH WARNING
.B atd
won't work if its spool directory is mounted via NFS even if
--- at-3.1.8/daemon.h.dontfork 1997-05-06 10:28:18.000000000 +0200
+++ at-3.1.8/daemon.h 2006-08-23 12:14:10.000000000 +0200
@@ -14,3 +14,5 @@
perr (const char *fmt, ...);
extern int daemon_debug;
+extern int daemon_nofork;
+
Index: at.spec
===================================================================
RCS file: /cvs/dist/rpms/at/devel/at.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- at.spec 12 Jul 2006 05:22:08 -0000 1.38
+++ at.spec 23 Aug 2006 11:46:32 -0000 1.39
@@ -4,7 +4,7 @@
Summary: Job spooling tools.
Name: at
Version: 3.1.8
-Release: 81.2
+Release: 82%{?dist}
License: GPL
Group: System Environment/Daemons
Source: http://ftp.debian.org/debian/pool/main/a/at/at_3.1.8-11.tar.gz
@@ -39,6 +39,7 @@
Patch32: at-3.1.8-pam_loginuid.patch
Patch33: at-3.1.8-getseuserbyname.patch
Patch34: at-3.1.8-install_no_chown.patch
+Patch35: at-3.1.8-dontfork.patch
Prereq: fileutils chkconfig /etc/init.d
BuildPrereq: flex bison autoconf
BuildPrereq: libselinux-devel >= 1.27.9
@@ -105,6 +106,7 @@
%patch32 -p1 -b .pam_loginuid
%patch33 -p1 -b .getseuserbyname
%patch34 -p1 -b .install_no_chown
+%patch35 -p1 -b .dontfork
%build
# patch10 touches configure.in
@@ -191,6 +193,9 @@
%attr(4755,root,root) %{_bindir}/at
%changelog
+* Thu Aug 23 2006 Marcela Maslanova <mmaslano at redhat.com> - 3.1.8-82.fc6
+- #176486 don't fork option added (patch from Enrico Scholz)
+
* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 3.1.8-81.2
- rebuild
More information about the fedora-cvs-commits
mailing list