Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions solo
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
#!/usr/bin/perl -s
#
# solo v1.5
# solo v1.7
# Prevents multiple cron instances from running simultaneously.
#
# Copyright 2007-2010 Timothy Kay
# Copyright 2007-2013 Timothy Kay
# http://timkay.com/solo/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# It is free software; you can redistribute it and/or modify it under the terms of either:
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# a) the GNU General Public License as published by the Free Software Foundation;
# either version 1 (http://dev.perl.org/licenses/gpl1.html), or (at your option)
# any later version (http://www.fsf.org/licenses/licenses.html#GNUGPL), or
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# b) the "Artistic License" (http://dev.perl.org/licenses/artistic.html), or
#
# c) the MIT License (http://opensource.org/licenses/MIT)
#

use Socket;
Expand All @@ -39,4 +36,7 @@ if ($port)

sleep $sleep if $sleep;

exec @ARGV;
unless(fork) {
exec @ARGV;
}
wait;