Sophie

Sophie

distrib > Mandriva > 2010.2 > x86_64 > by-pkgid > af0313fddb464e32c07ce9eef2a569ba > files > 3

daemonize-1.5.6-1mdv2010.0.src.rpm

Name:		daemonize
Version:	1.5.6
Release:	%mkrel 1
Summary:	Run a command as a Unix daemon
Source0:	http://www.clapper.org/software/daemonize/daemonize-%{version}.tar.gz
Source1:	http://www.clapper.org/software/daemonize/daemonize-%{version}.tar.gz.sig
URL:		http://www.clapper.org/software/daemonize/
License:	BSD
Group:		System/Servers
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
daemonize runs a command as a Unix daemon. As defined in W. Richard
Stevens' 1990 book, Unix Network Programming (Addison-Wesley, 1990), a
daemon is "a process that executes 'in the background' (i.e., without
an associated terminal or login shell) either waiting for some event to
occur, or waiting to perform some specified task on a periodic basis."

Upon startup, a typical daemon program will:
- Close all open file descriptors (especially standard input, standard
  output and standard error)
- Change its working directory to the root filesystem, to ensure that
  it doesn't tie up another filesystem and prevent it from being unmounted
- Reset its umask value
- Run in the background (i.e., fork)
- Disassociate from its process group (usually a shell), to insulate
  itself from signals (such as HUP) sent to the process group
- Ignore all terminal I/O signals
- Disassociate from the control terminal (and take steps not to
  reacquire one)
- Handle any SIGCLD signals

Most programs that are designed to be run as daemons do that work for
themselves. However, you'll occasionally run across one that does not.
When you must run a daemon program that does not properly make itself
into a true Unix daemon, you can use daemonize to force it to run as a
true daemon.

%prep
%setup -q

%build
%configure
%make

%install
%{__rm} -Rf %{buildroot}
%{__mkdir_p} %{buildroot}%{_sbindir}
%{__install} -m 0755 %{name} %{buildroot}%{_sbindir}
%{__mkdir_p} %{buildroot}%{_mandir}/man1
%{__install} -m 0755 %{name}.1 %{buildroot}%{_mandir}/man1

%files
%doc README CHANGELOG LICENSE
%{_sbindir}/%{name}
%{_mandir}/man1/%{name}.1*


%changelog
* Sat Jul 11 2009 Götz Waschk <waschk@mandriva.org> 1.5.6-1mdv2010.0
+ Revision: 394705
- update to new version 1.5.6

* Thu Aug 07 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.5.2-2mdv2009.0
+ Revision: 266554
- rebuild early 2009.0 package (before pixel changes)

* Wed Apr 30 2008 Götz Waschk <waschk@mandriva.org> 1.5.2-1mdv2009.0
+ Revision: 199461
- new version

  + Thierry Vignaud <tvignaud@mandriva.com>
    - fix no-buildroot-tag

* Mon Nov 12 2007 Nicolas Vigier <nvigier@mandriva.com> 1.5.1-2mdv2008.1
+ Revision: 108206
- add manpage

  + Thierry Vignaud <tvignaud@mandriva.com>
    - convert description from UTF-8 into ASCII

* Mon Nov 12 2007 Nicolas Vigier <nvigier@mandriva.com> 1.5.1-1mdv2008.1
+ Revision: 108127
- import daemonize