JBoss Native SVN: r2989 - trunk/build/patch.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 11:59:32 -0500 (Fri, 11 Jan 2013)
New Revision: 2989
Added:
trunk/build/patch/apr-1.4.6.patch
Modified:
trunk/build/patch/openssl-1.0.1c.patch
Log:
Arrange patches.
Added: trunk/build/patch/apr-1.4.6.patch
===================================================================
--- trunk/build/patch/apr-1.4.6.patch (rev 0)
+++ trunk/build/patch/apr-1.4.6.patch 2013-01-11 16:59:32 UTC (rev 2989)
@@ -0,0 +1,20 @@
+--- include/apr.hw
++++ include/apr.hw
+@@ -276,7 +276,7 @@
+ #define APR_HAVE_IN_ADDR 1
+ #define APR_HAVE_INET_ADDR 1
+ #define APR_HAVE_INET_NETWORK 0
+-#define APR_HAVE_IPV6 0
++#define APR_HAVE_IPV6 1
+ #define APR_HAVE_MEMMOVE 1
+ #define APR_HAVE_SETRLIMIT 0
+ #define APR_HAVE_SIGACTION 0
+@@ -340,7 +340,7 @@
+ /* If we have a TCP implementation that can be "corked", what flag
+ * do we use?
+ */
+-#define APR_TCP_NOPUSH_FLAG @apr_tcp_nopush_flag@
++#define APR_TCP_NOPUSH_FLAG 0
+
+ /* Is the TCP_NODELAY socket option inherited from listening sockets?
+ */
Modified: trunk/build/patch/openssl-1.0.1c.patch
===================================================================
--- trunk/build/patch/openssl-1.0.1c.patch 2013-01-11 14:28:54 UTC (rev 2988)
+++ trunk/build/patch/openssl-1.0.1c.patch 2013-01-11 16:59:32 UTC (rev 2989)
@@ -1,10 +1,28 @@
---- ./util/pl/VC-32.pl 2013-01-11 15:23:27.442257591 +0100
-+++ ./util/pl/VC-32.pl 2013-01-11 15:26:28.695290367 +0100
-@@ -178,6 +178,7 @@
+--- util/pl/VC-32.pl
++++ util/pl/VC-32.pl
+@@ -43,7 +43,7 @@
+ # considered safe to ignore.
+ #
+ $base_cflags= " $mf_cflag";
+- my $f = $shlib || $fips ?' /MD':' /MT';
++ my $f = ' /MD';
+ $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
+ $opt_cflags=$f.' /Ox';
+ $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
+@@ -124,7 +124,7 @@
+ else # Win32
+ {
+ $base_cflags= " $mf_cflag";
+- my $f = $shlib || $fips ?' /MD':' /MT';
++ my $f = ' /MD';
+ $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
+ $opt_cflags=$f.' /Ox /O2 /Ob2';
+ $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
+@@ -175,6 +175,7 @@
+ {
+ $ex_libs.=' gdi32.lib advapi32.lib crypt32.lib user32.lib';
+ $ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
++ $ex_libs.=' $(EXTRA_LIBS)';
# WIN32 UNICODE build gets linked with unicows.lib for
# backward compatibility with Win9x.
$ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ /\-DUNICODE/);
-+ $ex_libs.=' $(EXTRA_LIBS)'
- }
-
- # static library stuff
11 years, 11 months
JBoss Native SVN: r2988 - trunk/build/patch.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 09:28:54 -0500 (Fri, 11 Jan 2013)
New Revision: 2988
Added:
trunk/build/patch/openssl-1.0.1c.patch
Log:
Add EXTRA_LIBS
Added: trunk/build/patch/openssl-1.0.1c.patch
===================================================================
--- trunk/build/patch/openssl-1.0.1c.patch (rev 0)
+++ trunk/build/patch/openssl-1.0.1c.patch 2013-01-11 14:28:54 UTC (rev 2988)
@@ -0,0 +1,10 @@
+--- ./util/pl/VC-32.pl 2013-01-11 15:23:27.442257591 +0100
++++ ./util/pl/VC-32.pl 2013-01-11 15:26:28.695290367 +0100
+@@ -178,6 +178,7 @@
+ # WIN32 UNICODE build gets linked with unicows.lib for
+ # backward compatibility with Win9x.
+ $ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ /\-DUNICODE/);
++ $ex_libs.=' $(EXTRA_LIBS)'
+ }
+
+ # static library stuff
11 years, 11 months
JBoss Native SVN: r2987 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 06:35:57 -0500 (Fri, 11 Jan 2013)
New Revision: 2987
Modified:
trunk/build/unix/build.sh
Log:
disable ecdh and ecdsa for openssl.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2013-01-11 11:15:24 UTC (rev 2986)
+++ trunk/build/unix/build.sh 2013-01-11 11:35:57 UTC (rev 2987)
@@ -676,7 +676,7 @@
fi
SSLNUM=`basename ${ssl_srcdir} | awk -F - '{ print $2}' | sed 's:[a-z]::'`
echo "Configuring OpenSSL ${ssl_version} for ${BUILD_TAG} ..."
- ssl_common_flags="threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec"
+ ssl_common_flags="threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec no-ecdh no-ecdsa"
if $ssl_static ; then
ssl_build_flags="no-asm no-shared"
else
11 years, 11 months
JBoss Native SVN: r2986 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 06:15:24 -0500 (Fri, 11 Jan 2013)
New Revision: 2986
Modified:
trunk/build/unix/build.sh
Log:
more openssl 1.0.x changes...
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2013-01-11 10:41:29 UTC (rev 2985)
+++ trunk/build/unix/build.sh 2013-01-11 11:15:24 UTC (rev 2986)
@@ -721,7 +721,8 @@
;;
windows-x86)
./Configure ${ssl_target} VC-WIN32
- ms/do_masm.bat
+ # openssl 1.0.x uses do_nasm, not do_masm :D
+ ms/do_nasm.bat
;;
windows-x64)
./Configure ${ssl_target} VC-WIN64A
11 years, 11 months
JBoss Native SVN: r2985 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 05:41:29 -0500 (Fri, 11 Jan 2013)
New Revision: 2985
Modified:
trunk/build/unix/build.sh
Log:
In openssl 1.0.x - VC-NT change to VC-WIN32.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2013-01-11 09:22:51 UTC (rev 2984)
+++ trunk/build/unix/build.sh 2013-01-11 10:41:29 UTC (rev 2985)
@@ -720,7 +720,7 @@
./Configure ${ssl_target} ${ssl_common_flags} ${ssl_build_flags} linux-ppc64 || exit 1
;;
windows-x86)
- ./Configure ${ssl_target} VC-NT
+ ./Configure ${ssl_target} VC-WIN32
ms/do_masm.bat
;;
windows-x64)
11 years, 11 months
JBoss Native SVN: r2984 - in trunk/build: windows and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 04:22:51 -0500 (Fri, 11 Jan 2013)
New Revision: 2984
Modified:
trunk/build/daemon/buildnat.bat
trunk/build/windows/buildnew.bat
Log:
Remove more now useless stuff...
Modified: trunk/build/daemon/buildnat.bat
===================================================================
--- trunk/build/daemon/buildnat.bat 2013-01-11 08:55:48 UTC (rev 2983)
+++ trunk/build/daemon/buildnat.bat 2013-01-11 09:22:51 UTC (rev 2984)
@@ -47,8 +47,8 @@
pushd %BUILD_HOME%\windows
REM static dll tcnative-1.dll
-call buildnew.bat sdk static x86 jboss-native -ssl -cache -static
-call buildnew.bat sdk static x64 jboss-native -ssl -cache -static
+call buildnew.bat static x86 jboss-native -ssl -cache -static
+call buildnew.bat static x64 jboss-native -ssl -cache -static
REM call build.bat sdk static i64 jboss-native -ssl -cache -static
REM Uncomment for building sight
REM call build.bat sdk x86 jboss-sight -cache
Modified: trunk/build/windows/buildnew.bat
===================================================================
--- trunk/build/windows/buildnew.bat 2013-01-11 08:55:48 UTC (rev 2983)
+++ trunk/build/windows/buildnew.bat 2013-01-11 09:22:51 UTC (rev 2984)
@@ -74,25 +74,7 @@
)
set BUILD_OS=windows
-set CRT_REDIST=
-set USE_PLATFORM_SDK=
-set APR_DECLARE_STATIC=
-set INCLUDE_PRE64PRA=
-set INCLUDE_BUFFEROVERFLOWU=
-echo set BUILD_OS=windows >> %ENV_BAT%
-echo set CRT_REDIST= >> %ENV_BAT%
-echo set USE_PLATFORM_SDK= >> %ENV_BAT%
-echo set APR_DECLARE_STATIC= >> %ENV_BAT%
-echo set INCLUDE_PRE64PRA= >> %ENV_BAT%
-echo set INCLUDE_BUFFEROVERFLOWU= >> %ENV_BAT%
-
-@if not "%1" == "sdk" goto checkSTATIC
-shift
-set USE_PLATFORM_SDK=1
-echo set USE_PLATFORM_SDK=1 >> %ENV_BAT%
-
-:checkSTATIC
@if /i "%1" == "static" goto makeSTATIC
goto checkCPU
@@ -130,20 +112,7 @@
goto cmdBuild
:cmdBuild
-@for /D %%i IN (%INCLUDE%) DO (
- @if exist "%%i\PRE64PRA.H" (
- set INCLUDE_PRE64PRA=1
- echo set INCLUDE_PRE64PRA=1 >> %ENV_BAT%
- )
-)
-@for /D %%i IN (%LIB%) DO (
- @if exist "%%i\bufferoverflowu.lib" (
- set INCLUDE_BUFFEROVERFLOWU=1
- echo set INCLUDE_BUFFEROVERFLOWU=1 >> %ENV_BAT%
- )
-)
-
set INIT=%LOCAL_DIR%
echo set INIT=%LOCAL_DIR% >> %ENV_BAT%
pushd %BUILD_HOME%\unix
11 years, 11 months
JBoss Native SVN: r2983 - in trunk/build: windows and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 03:55:48 -0500 (Fri, 11 Jan 2013)
New Revision: 2983
Added:
trunk/build/windows/buildnew.bat
Modified:
trunk/build/daemon/buildnat.bat
Log:
Use the new build:
'c:\cmsc\setenv.bat /x86' or 'c:\cmsc\setenv.bat /x64'
Modified: trunk/build/daemon/buildnat.bat
===================================================================
--- trunk/build/daemon/buildnat.bat 2013-01-11 07:54:20 UTC (rev 2982)
+++ trunk/build/daemon/buildnat.bat 2013-01-11 08:55:48 UTC (rev 2983)
@@ -47,9 +47,9 @@
pushd %BUILD_HOME%\windows
REM static dll tcnative-1.dll
-call build.bat sdk static x86 jboss-native -ssl -cache -static
-call build.bat sdk static x64 jboss-native -ssl -cache -static
-call build.bat sdk static i64 jboss-native -ssl -cache -static
+call buildnew.bat sdk static x86 jboss-native -ssl -cache -static
+call buildnew.bat sdk static x64 jboss-native -ssl -cache -static
+REM call build.bat sdk static i64 jboss-native -ssl -cache -static
REM Uncomment for building sight
REM call build.bat sdk x86 jboss-sight -cache
REM call build.bat sdk x64 jboss-sight -cache
Added: trunk/build/windows/buildnew.bat
===================================================================
--- trunk/build/windows/buildnew.bat (rev 0)
+++ trunk/build/windows/buildnew.bat 2013-01-11 08:55:48 UTC (rev 2983)
@@ -0,0 +1,158 @@
+@echo off
+REM Copyright(c) 2013 Red Hat Middleware, LLC,
+REM and individual contributors as indicated by the @authors tag.
+REM See the copyright.txt in the distribution for a
+REM full listing of individual contributors.
+REM
+REM This library is free software; you can redistribute it and/or
+REM modify it under the terms of the GNU Lesser General Public
+REM License as published by the Free Software Foundation; either
+REM version 2 of the License, or (at your option) any later version.
+REM
+REM This library is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+REM Lesser General Public License for more details.
+REM
+REM You should have received a copy of the GNU Lesser General Public
+REM License along with this library in the file COPYING.LIB;
+REM if not, write to the Free Software Foundation, Inc.,
+REM 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+REM
+REM @author Mladen Turk
+REM @author Jean-Frederic Clere
+REM
+
+
+@if not "%ECHO%" == "" echo %ECHO%
+@if "%OS%" == "Windows_NT" setlocal
+
+if "%OS%" == "Windows_NT" (
+set "DIRNAME=%~dp0%"
+set "PROGNAME=%~nx0%"
+) else (
+echo Detected uncompatible Windows version.
+goto cmdEnd
+)
+
+set LOCAL_DIR=%CD%
+pushd %DIRNAME%..
+set BUILD_HOME=%CD%
+popd
+
+echo.
+echo Running : %PROGNAME% $LastChangedDate: 2009-01-22 12:01:27 +0100 (Thu, 22 Jan 2009) $
+echo.
+echo Started : %DATE% %TIME%
+echo Params : %*
+echo.
+
+set ENV_BAT=%BUILD_HOME%\env.%1.%2.bat
+echo Writting conf in %ENV_BAT%
+echo REM Generated by %PROGNAME% %DATE% %TIME% > %ENV_BAT%
+echo REM Params : %* >> %ENV_BAT%
+
+REM Check for cygwin in the PATH
+@if "%CYGWIN_INSTALL_DIR%" == "" (
+ set CYGWIN_INSTALL_DIR=C:\cygwin
+ echo set CYGWIN_INSTALL_DIR=C:\cygwin >> %ENV_BAT%
+)
+@if exist "%CYGWIN_INSTALL_DIR%\" goto cmdFoundCygwin
+echo CYGWIN_INSTALL_DIR points to invalid directory %CYGWIN_INSTALL_DIR%
+goto cmdEnd
+
+:cmdFoundCygwin
+set PATH=%CYGWIN_INSTALL_DIR%\bin;%PATH%
+echo set PATH=%CYGWIN_INSTALL_DIR%\bin;%PATH% >> %ENV_BAT%
+
+REM Then for an acceptable location.
+bash check_path.sh
+@if ERRORLEVEL 1 (
+ echo Can't run inside cygwin install path
+ echo Install the source in another location c:\home\my for example
+ goto cmdEnd
+)
+
+set BUILD_OS=windows
+set CRT_REDIST=
+set USE_PLATFORM_SDK=
+set APR_DECLARE_STATIC=
+set INCLUDE_PRE64PRA=
+set INCLUDE_BUFFEROVERFLOWU=
+
+echo set BUILD_OS=windows >> %ENV_BAT%
+echo set CRT_REDIST= >> %ENV_BAT%
+echo set USE_PLATFORM_SDK= >> %ENV_BAT%
+echo set APR_DECLARE_STATIC= >> %ENV_BAT%
+echo set INCLUDE_PRE64PRA= >> %ENV_BAT%
+echo set INCLUDE_BUFFEROVERFLOWU= >> %ENV_BAT%
+
+@if not "%1" == "sdk" goto checkSTATIC
+shift
+set USE_PLATFORM_SDK=1
+echo set USE_PLATFORM_SDK=1 >> %ENV_BAT%
+
+:checkSTATIC
+@if /i "%1" == "static" goto makeSTATIC
+goto checkCPU
+
+:makeSTATIC
+shift
+set APR_DECLARE_STATIC=1
+echo set APR_DECLARE_STATIC=1 >> %ENV_BAT%
+
+:checkCPU
+set BUILD_CPU=%1
+echo set BUILD_CPU=%1 >> %ENV_BAT%
+shift
+@if /i "%BUILD_CPU%" == "i686" goto cpuX86
+@if /i "%BUILD_CPU%" == "x86" goto cpuX86
+@if /i "%BUILD_CPU%" == "amd64" goto cpuX64
+@if /i "%BUILD_CPU%" == "emt64" goto cpuX64
+@if /i "%BUILD_CPU%" == "x86_64" goto cpuX64
+@if /i "%BUILD_CPU%" == "x64" goto cpuX64
+echo Usage: %PROGNAME% CPU where CPU is x86 x64 or ia64
+echo or : %PROGNAME% sdk CPU if you are cross compiling
+goto cmdEnd
+
+:cpuX86
+set BUILD_CPU=x86
+echo set BUILD_CPU=x86 >> %ENV_BAT%
+call "c:\cmsc\setenv.bat" /x86
+echo call "c:\cmsc\setenv.bat" /x86 >> %ENV_BAT%
+goto cmdBuild
+
+:cpuX64
+set BUILD_CPU=x64
+echo set BUILD_CPU=x64 >> %ENV_BAT%
+call "c:\cmsc\setenv.bat" /x64
+echo call "c:\cmsc\setenv.bat" /x64 >> %ENV_BAT%
+goto cmdBuild
+
+:cmdBuild
+@for /D %%i IN (%INCLUDE%) DO (
+ @if exist "%%i\PRE64PRA.H" (
+ set INCLUDE_PRE64PRA=1
+ echo set INCLUDE_PRE64PRA=1 >> %ENV_BAT%
+ )
+)
+
+@for /D %%i IN (%LIB%) DO (
+ @if exist "%%i\bufferoverflowu.lib" (
+ set INCLUDE_BUFFEROVERFLOWU=1
+ echo set INCLUDE_BUFFEROVERFLOWU=1 >> %ENV_BAT%
+ )
+)
+
+set INIT=%LOCAL_DIR%
+echo set INIT=%LOCAL_DIR% >> %ENV_BAT%
+pushd %BUILD_HOME%\unix
+bash build.sh %1 %2 %3 %4 %5
+@if ERRORLEVEL 1 (
+ echo build.sh failed
+ popd
+ EXIT 1
+)
+popd
+
+:cmdEnd
11 years, 11 months
JBoss Native SVN: r2982 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-01-11 02:54:20 -0500 (Fri, 11 Jan 2013)
New Revision: 2982
Modified:
trunk/build/unix/package.list
Log:
Upgrade apr and openssl.
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2013-01-10 07:00:07 UTC (rev 2981)
+++ trunk/build/unix/package.list 2013-01-11 07:54:20 UTC (rev 2982)
@@ -12,8 +12,8 @@
jboss-native|2.0.8|TOMCAT_NATIVE_1_1_18|apr:v:1.3.8|apu:v:1.3.9|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
jboss-native|2.0.9|TOMCAT_NATIVE_1_1_20|apr:v:1.3.8|apu:v:1.3.9|api:v:1.2.1|ssl:v:0.9.8k|zlib:v:1.2.3
jboss-native|2.0.10|TOMCAT_NATIVE_1_1_22|apr:v:1.3.12|ssl:v:0.9.8r
-jboss-native|2.0.11-dev|branches/1.1.x|apr:v:1.3.12|ssl:v:0.9.8r
jboss-native|2.0.11|TOMCAT_NATIVE_1_1_24|apr:v:1.3.12|ssl:v:0.9.8r
+jboss-native|2.0.12-dev|branches/1.1.x|apr:v:1.4.6|ssl:v:1.0.1c
# SIGHT
jboss-sight|1.0.0|trunk|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1
jboss-sight|1.0.1|trunk|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1
11 years, 11 months
JBoss Native SVN: r2980 - trunk/utils/windows/native/service/jbosssvc.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2013-01-04 05:25:51 -0500 (Fri, 04 Jan 2013)
New Revision: 2980
Modified:
trunk/utils/windows/native/service/jbosssvc/jboss.c
trunk/utils/windows/native/service/jbosssvc/jboss.manifest
trunk/utils/windows/native/service/jbosssvc/jboss.rc
Log:
Make sure shutdown has timeout as well
Modified: trunk/utils/windows/native/service/jbosssvc/jboss.c
===================================================================
--- trunk/utils/windows/native/service/jbosssvc/jboss.c 2013-01-03 01:27:44 UTC (rev 2979)
+++ trunk/utils/windows/native/service/jbosssvc/jboss.c 2013-01-04 10:25:51 UTC (rev 2980)
@@ -1,7 +1,7 @@
/*
* JBOSSSVC - JBoss Service helper
*
- * Copyright(c) 2012 Red Hat Inc.,
+ * Copyright(c) 2013 Red Hat Inc.,
* and individual contributors as indicated by the @authors tag.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
@@ -636,11 +636,11 @@
if (dwCurrentState == SERVICE_START_PENDING)
_service_status.dwControlsAccepted = 0;
else
- _service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
+ _service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
_service_status.dwCurrentState = dwCurrentState;
_service_status.dwWin32ExitCode = dwWin32ExitCode;
- _service_status.dwWaitHint = dwWaitHint;
+ _service_status.dwWaitHint = dwWaitHint * 1000;
if ((dwCurrentState == SERVICE_RUNNING) ||
(dwCurrentState == SERVICE_STOPPED))
@@ -710,10 +710,6 @@
} while (Process32Next(hProcessSnap, &pe32));
CloseHandle(hProcessSnap);
- if (WaitForSingleObject(_service_run_event, 2000) == WAIT_TIMEOUT) {
- if (_service_run_hproc != NULL)
- return TerminateProcess(_service_run_hproc, retCode);
- }
return TRUE;
}
@@ -730,24 +726,29 @@
BuildCommandLine(cmd, "stop");
AddToMessageLog(FALSE, "Stopping service %s", _service_name);
-
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, _service_shtm);
if (RunChildProcess(_cmd_exe, cmd, &prInfo)) {
- WaitForSingleObject(prInfo.hProcess, INFINITE);
- AddToMessageLog(FALSE, "Stopped service %s", _service_name);
+ if (WaitForSingleObject(prInfo.hProcess, _service_shtm * 1000) == WAIT_OBJECT_0)
+ AddToMessageLog(FALSE, "Service stop executed %s", _service_name);
+ else
+ TerminateProcessGroup(prInfo.dwProcessId, 1);
CloseHandle(prInfo.hProcess);
CloseHandle(prInfo.hThread);
- ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
- if (WaitForSingleObject(_service_run_event, _service_shtm * 1000) == WAIT_TIMEOUT) {
- ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
+ ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, _service_shtm);
+ if (WaitForSingleObject(_service_run_event, _service_shtm * 1000) != WAIT_OBJECT_0) {
+ ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 2);
TerminateProcessGroup(_service_run_pid, 1);
+ if (WaitForSingleObject(_service_run_event, 2000) != WAIT_OBJECT_0) {
+ if (_service_run_hproc != NULL)
+ TerminateProcess(_service_run_hproc, 1);
+ }
AddToMessageLog(FALSE, "Service forcibly terminated %s", _service_name);
}
}
ReportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);
- AddToMessageLog(FALSE, "Stopping service %s", _service_name);
+ AddToMessageLog(FALSE, "Stopped service %s", _service_name);
return 0;
}
@@ -785,6 +786,7 @@
switch (dwCtrlCode) {
case SERVICE_CONTROL_STOP:
+ case SERVICE_CONTROL_SHUTDOWN:
/* Call the stop handler that will actualy stop the service */
ServiceStop();
return;
@@ -889,7 +891,7 @@
goto cleanup;
}
}
- ReportServiceStatus(SERVICE_START_PENDING, NO_ERROR, 3000);
+ ReportServiceStatus(SERVICE_START_PENDING, NO_ERROR, 3);
if ((rc = ServiceStart()) == 0) {
AddToMessageLog(FALSE, "Service %s Main finished", _service_name);
}
Modified: trunk/utils/windows/native/service/jbosssvc/jboss.manifest
===================================================================
--- trunk/utils/windows/native/service/jbosssvc/jboss.manifest 2013-01-03 01:27:44 UTC (rev 2979)
+++ trunk/utils/windows/native/service/jbosssvc/jboss.manifest 2013-01-04 10:25:51 UTC (rev 2980)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
- Copyright(c) 2012 Red Hat Inc.,
+ Copyright(c) 2013 Red Hat Inc.,
and individual contributors as indicated by the @authors tag.
See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: trunk/utils/windows/native/service/jbosssvc/jboss.rc
===================================================================
--- trunk/utils/windows/native/service/jbosssvc/jboss.rc 2013-01-03 01:27:44 UTC (rev 2979)
+++ trunk/utils/windows/native/service/jbosssvc/jboss.rc 2013-01-04 10:25:51 UTC (rev 2980)
@@ -1,7 +1,7 @@
/*
* JBOSSSVC - JBoss Service helper
*
- * Copyright(c) 2012 Red Hat Middleware, LLC,
+ * Copyright(c) 2013 Red Hat Middleware, LLC,
* and individual contributors as indicated by the @authors tag.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
@@ -25,7 +25,7 @@
*/
#include <windows.h>
-#define STR_COPYRIGHT "Copyright � 2012 Red Hat Inc. " \
+#define STR_COPYRIGHT "Copyright � 2013 Red Hat Inc. " \
"or its licensors, as applicable."
#define STR_LICENSE "Distributable under LGPL license. " \
12 years