History log of /freebsd-10.0-release/usr.sbin/daemon/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255707 19-Sep-2013 trociny

1. Properly clean pid files in the case of the error.
2. Write the supervisor pid before the restart loop, so we don't
uselessly rewrite it after every child restart.
3. Remove duplicate ppfh and pfh initialization.

Approved by: re (glebius)
MFC after: 2 weeks


255526 13-Sep-2013 joel

mdoc: remove EOL whitespace.

Approved by: re (blanket)


255521 13-Sep-2013 jmg

add support for writing the pid of the daemon program to a pid file so
that daemon can be used w/ rc.subr and ports can use the additional
functionality, such as keeping the ldap daemon up and running, and have
the proper program to signal to exit..

PR: bin/181341
Submitted by: feld
Approved by: re (glebius)


244986 03-Jan-2013 marius

Remove bogus '-' from getopt(3) string hit when porting daemon(8) to
GNU/Linux *duck*.

MFC after: 1 week


236551 04-Jun-2012 trociny

Document -r option in SYNOPSIS and usage statement.

Submitted by: Andrey Zonov <andrey zonov.org>
MFC after: 3 days


236550 04-Jun-2012 trociny

On a child exit, call waitpid(2) to clean up the process table.

Submitted by: Andrey Zonov <andrey zonov.org>
MFC after: 1 week


231912 19-Feb-2012 trociny

If permitted protect the supervisor against pageout kill.

Suggested by: Andrey Zonov <andrey zonov org>
MFC after: 2 weeks


231911 19-Feb-2012 trociny

Add -r option to restart the program if it has been terminated.

Suggested by: Andrey Zonov <andrey zonov org>
MFC after: 2 weeks


231910 19-Feb-2012 trociny

If the supervising process receives SIGTERM, forward it to the spawned
process. Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

MFC after: 2 weeks


231909 19-Feb-2012 trociny

The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by: Andrey Zonov <andrey zonov org>
Suggested by: pjd
Reviewed by: pjd
MFC after: 2 weeks


230869 01-Feb-2012 ghelmer

Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb


230541 25-Jan-2012 ghelmer

Revert 229667: After some discussion of this change, it seems it is
better to leave the pidfile open where it was. Add a note to the
man page describing pidfile strategies to use if the daemon is to
be run as a user other than root.


229667 05-Jan-2012 ghelmer

Allow daemon(8) to run pidfile_open() before relenquishing privileges
so pid files can be written in /var/run when started as root.

I do not expect this to cause any security issues, but if anyone objects
it could be easily reverted.

PR: bin/159568
MFC after: 4 weeks


208190 17-May-2010 ivoras

Slightly improve wording.


201390 02-Jan-2010 ed

The last big commit: let usr.sbin/ use WARNS=6 by default.


168868 19-Apr-2007 peter

Unbreak rev 1.7's getopt usage. The -f switch does not take an argument.
The stray ':' was from the defunct '-g' group arg.


167700 19-Mar-2007 trhodes

Improve previous commit by using setusercontext(3) and removing the group
option. Bump doc date for manual page changes.

Reviewed by: rwatson, ru, will (older version)


167357 09-Mar-2007 trhodes

Initialize *pfh to NULL to quiet a gcc warning, not part of my original
commit because it was not part of the new code.


167356 09-Mar-2007 trhodes

Add support for dropping privileges to a specified user and/or group.

PR: 108523
Submitted by: Dmitri Alenitchev <dmitri@dworlds.ru> (original version)
Reviewed by: mpp (first reply to PR)


149424 24-Aug-2005 pjd

Teach daemon(8) how to use pidfile(3).


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


131754 07-Jul-2004 ru

mdoc(7) fixes.


129983 02-Jun-2004 phk

Give daemon(8) the ability to create a pid-file. Since the target program
does not know anything about the pid-file and we don't keep a babysitting
process for the task, the pid-file will linger.

Submitted by: mi
PR: 56398


117280 06-Jul-2003 charnier

add FBSDID


113091 04-Apr-2003 obrien

style.Makefile(5)


110410 05-Feb-2003 trhodes

MFS: 1.2.2.2


82652 31-Aug-2001 ru

mdoc(7) police: minor formatting tweaks.


82547 30-Aug-2001 mike

Add a new utility that runs an executable detached from the
controlling terminal.

Discussed on: -hackers
Obtained from: BSD/OS