ada9f5d833
Merge pull request #59 from ilmari/patch-1
...
Set exit status in synopsis
2014-06-24 12:15:01 -07:00
3c87a0553f
Merge pull request #61 from hemmop/master
...
Allow custom reload and stop signals
2014-05-19 11:44:38 -07:00
Per Carlson
d9ad4479a2
Added custom reload and stop signals
2014-05-19 11:11:12 +02:00
Dagfinn Ilmari Mannsåker
7272c943e5
Set exit status in synopsis
...
->run now returns the exit status, which needs to be propagated by the script, so include that in the synopsis.
2014-03-05 11:47:29 +00:00
041675862b
Module name POD format fixed (RT 93280)
2014-02-23 07:04:32 -08:00
ba849f2275
Version bump for CPAN release.
2014-02-19 08:44:12 -08:00
e23af3be1f
Allow foregrounding of applications
...
This feature has been sitting on the backburner for too long. Now
you can foreground an application in three ways:
1) At compile-time, use foreground => 1 in your constructor
2) At run-time from the command itself: init.pl foreground
3) At run-time from the environment settings: DC_FOREGROUND=1 init.pl start
This closes #15
2013-12-26 07:02:22 -05:00
ce57bc0b40
Added run_command method
...
This new method allows giving the action as an argument, and returns
the exit code which would have been used. The origional run method
has become a shortcut for this method and remains backwards compatible.
This closes https://github.com/symkat/Daemon-Control/issues/57
2013-12-26 05:42:06 -05:00
0021b4eb9d
Constructor now accepts a list
...
You can now pass a list to ->new() without wrapping it
as a hashref, since it's prettier and becoming expected
behavior.
2013-12-26 05:08:10 -05:00
36904d4a74
Prep for CPAN Deploy.
2013-08-27 06:14:29 -07:00
d3bf1b36df
Merge pull request #53 from atomicstack/master
...
Abort the kill loop in do_stop if $self->pid changes midway.
2013-08-27 06:12:06 -07:00
Matt Koscica
777672fa54
Remove check against read_pid, which could result in unkilled processes.
...
Also expand comment about pid_file removal.
2013-08-22 12:50:44 +02:00
Matt Koscica
63ffb672dc
Remove un-necessary variable.
2013-08-21 21:06:46 +02:00
Matt Koscica
926b547ada
Change do_stop so it won't unlink pid_file if the pid changes midway.
...
Originally the code would kill pidfiles for standbys being promoted
to active workers in HA scenarios.
2013-08-21 20:59:05 +02:00
Matt Koscica
48f71af097
Abort the kill loop in do_stop if $self->pid changes midway.
...
If we're running in a high-availability situation, this prevents
do_stop from terminating a standby worker, in addition to the currently
exiting active worker, from getting taken out by the kill loop,
after it has promoted itself to the active worker as a result of
running `$main_worker stop`. We do this by caching the PID we first
encounter, and aborting the kill loop immediately if we see it change
while we're inside the kill loop.
2013-08-21 15:31:18 +02:00
863c722479
Correct dates in Changes, bump version for CPAN release.
2013-07-12 11:44:20 -07:00
ab4ebc8e86
Drop quiet accessor from base example.
2013-07-12 11:42:39 -07:00
0382f867b8
Merge pull request #51 from mattp-/master
...
adds quiet boolean constructor flag
2013-07-12 11:40:18 -07:00
Matt Phillips
deaf492b95
adds quiet boolean constructor flag
2013-07-12 14:31:32 -04:00
de6732f2cb
Merge pull request #50 from karenetheridge/topic/changelog
...
oops, forgot to update changelog with the issue number
2013-07-11 11:39:07 -07:00
Karen Etheridge
bd95b7de9d
oops, forgot to update changelog with the issue number
2013-07-11 09:59:27 -07:00
934e7eb6d7
Version bump for CPAN release.
2013-07-10 20:58:49 -07:00
79c181c627
Merge pull request #49 from karenetheridge/topic/single_fork_pid
...
properly write the pid (not 0) to the pidfile in single fork mode (GH#49)
2013-07-10 16:29:09 -07:00
Karen Etheridge
f657f78626
properly write the pid (not 0) to the pidfile in single fork mode (GH#49)
2013-07-10 16:23:28 -07:00
5612b30ea4
Merge pull request #48 from avar/master
...
Make it possible to start daemons as root/root by setting user/group to root/root
2013-05-08 17:58:46 -07:00
Ævar Arnfjörð Bjarmason
71fd6f0779
Make it possible to set user/group to root/root
...
Change the check for valid users/groups to check for definiedness
instead of for whether the return value is true. Makes it possible to
run a daemon as root/root.
2013-05-08 22:29:43 +02:00
7499806845
Merge pull request #47 from avar/in-ur-pod-messing-up-ur-encodungs
...
Having non-ASCII characters in the POD requires "=encoding utf8"
2013-05-08 10:27:20 -07:00
Ævar Arnfjörð Bjarmason
7bc1529dfe
Having non-ASCII characters in the POD requires "=encoding utf8"
2013-05-08 17:24:29 +00:00
80cefba89d
Changes and Contrib updates from last pull.
2013-05-08 10:17:10 -07:00
762d8c079a
Merge pull request #46 from avar/master
...
Use the perl tests were invoked with, instead of the perl in $PATH. #45
2013-05-08 10:08:28 -07:00
Ævar Arnfjörð Bjarmason
65a6aac920
Don't hardcode "perl" in invocations, use $^X instead
...
The tests would break if you were building the module in an
environment where "perl" in $PATH wasn't the "perl" you were calling
Makefile.PL with.
2013-05-08 16:28:18 +00:00
fbf308a670
Prepping for CPAN Release.
2013-04-29 15:07:14 -07:00
ecb13a08e8
Merge pull request #44 from karenetheridge/topic/flush_stdout
...
ensure stdout is flushed immediately during pretty_print
2013-04-29 14:47:02 -07:00
Karen Etheridge
4fedc8521c
ensure stdout is flushed immediately during pretty_print
2013-04-29 09:53:33 -07:00
1efa777888
Merge pull request #43 from karenetheridge/topic/detect_dupe_process
...
"check_duplicate_process" feature
2013-04-22 16:22:17 -07:00
Karen Etheridge
42f433a62a
"prereq_no_process" feature
...
Searches the `ps` list for anything that looks like the daemon that might
already be running.
Both the program name and arguments are checked, as it appears different
operating systems vary as to how they populate `ps`: On ubuntu, my daemon
looks like:
/path/to/perl /path/to/program args
but on CentOS, the very same code shows up as:
/path/to/program args
2013-04-22 16:12:26 -07:00
cfadb8f133
Merge pull request #42 from karenetheridge/topic/fix_broken_tests
...
Topic/fix broken tests
2013-04-19 18:45:19 -07:00
74c8922b3e
Merge pull request #41 from karenetheridge/topic/faster_stop
...
check every second for kill_timeout seconds if the daemon has terminated...
2013-04-19 18:41:02 -07:00
Karen Etheridge
aaca307478
fix broken tests - piddir could be current directory
2013-04-19 13:37:59 -07:00
Karen Etheridge
a81b386a90
use tighter regexps to be sure of the daemon state -- qr/Running/ also matches "[Not Running]"!!!
2013-04-19 13:37:31 -07:00
Karen Etheridge
dbd92d556d
switch to using like() and is()
2013-04-19 13:32:13 -07:00
Karen Etheridge
e56baf1a88
check every second for kill_timeout seconds if the daemon has terminated, rather than only checking at the end
2013-04-19 11:40:26 -07:00
7e7e736ab8
Merge pull request #40 from karenetheridge/topic/morepatches_20130418
...
Topic/morepatches 20130418
2013-04-18 19:23:48 -07:00
Karen Etheridge
0aa0e9e4f9
we can always determine the new $USER, from uid if necessary
2013-04-18 16:50:15 -07:00
Karen Etheridge
bcc3e970c0
fix "Can't use an undefined value as an ARRAY reference at ... line 177" when exec fails and program_args is not defined
2013-04-18 16:49:18 -07:00
Karen Etheridge
e2753e5f8b
create the pid_file dir if it does not exist
...
- steal the _create_resource_dir sub to create a generic dir
- re-use it to create the pid dir
- with a few more trace() diagnostics too
2013-04-18 16:49:18 -07:00
Karen Etheridge
c3cf4cdfbb
spelling
2013-04-18 16:49:18 -07:00
Karen Etheridge
67736776a4
oops, I recorded these Changes wrong
2013-04-18 14:16:00 -07:00
a910724bb5
Merge pull request #39 from karenetheridge/topic/clean_up_changes_file_and_prereq
...
Topic/clean up changes file and prereq
2013-04-18 12:40:15 -07:00
Karen Etheridge
c9e0768e77
done_testing requires Test::More 0.88
2013-04-18 11:36:16 -07:00