From 133bb8a1a8a561cea34a70cee44184e195654133 Mon Sep 17 00:00:00 2001 From: Sander Heijselaar Date: Thu, 10 Apr 2014 11:40:32 +0200 Subject: [PATCH 1/2] Updated to the version 1.6 from http://timkay.com/solo/solo --- solo | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/solo b/solo index 3265673..229dfe1 100755 --- a/solo +++ b/solo @@ -1,23 +1,20 @@ #!/usr/bin/perl -s # -# solo v1.5 +# solo v1.6 # 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 . +# b) the "Artistic License" (http://dev.perl.org/licenses/artistic.html), or +# +# c) the MIT License (http://opensource.org/licenses/MIT) # use Socket; From d6d1296b8cfcf801a65ae737d611d6047710385f Mon Sep 17 00:00:00 2001 From: Sander Heijselaar Date: Thu, 10 Apr 2014 11:42:58 +0200 Subject: [PATCH 2/2] Minor change to wait when the process is a fork and to exec @ARGV when it's not --- solo | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/solo b/solo index 229dfe1..707ffec 100755 --- a/solo +++ b/solo @@ -1,6 +1,6 @@ #!/usr/bin/perl -s # -# solo v1.6 +# solo v1.7 # Prevents multiple cron instances from running simultaneously. # # Copyright 2007-2013 Timothy Kay @@ -36,4 +36,7 @@ if ($port) sleep $sleep if $sleep; -exec @ARGV; +unless(fork) { + exec @ARGV; +} +wait; \ No newline at end of file