2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-28 02:44:53 +00:00

Force nofork on Windows

git-svn-id: https://svn.fhem.de/fhem/trunk@420 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2009-08-04 08:03:57 +00:00
parent 0d18e1eb17
commit 2db7a97db2
2 changed files with 8 additions and 1 deletions

@ -520,3 +520,4 @@
- bugfix: Add binmode to 01_fhemweb.pm for windows
- bugfix: Uniform check for windows, enable CUL for windows.
- bugfix: CUL/HMS parsing patches from Peter
- bugfix: Fixes for Windows by Klaus

@ -151,7 +151,7 @@ my %defaultattr; # Default attributes
my %intAt; # Internal at timer hash.
my $nextat; # Time when next timer will be triggered.
my $intAtCnt=0;
my $cvsid = '$Id: fhem.pl,v 1.76 2009-07-26 09:20:07 rudolfkoenig Exp $';
my $cvsid = '$Id: fhem.pl,v 1.77 2009-08-04 08:03:57 rudolfkoenig Exp $';
my $namedef =
"where <name> is either:\n" .
"- a single device name\n" .
@ -254,6 +254,12 @@ if(int(@ARGV) == 2) {
my $ret = CommandInclude(undef, $attr{global}{configfile});
die($ret) if($ret);
if($^O =~ m/Win/ && !$attr{global}{nofork}) {
Log 1, "Forcing 'attr global nofork' on WINDOWS";
Log 1, "set it in the config file to avoud this message";
$attr{global}{nofork}=1;
}
# Go to background if the logfile is a real file (not stdout)
if($attr{global}{logfile} ne "-" && !$attr{global}{nofork}) {
defined(my $pid = fork) || die "Can't fork: $!";