Encontré un método para resolver mi pregunta, compilar el siguiente código c y denominé el resultado exe como runjob.exe, y luego en el archivo hook bat, uso "runjob another_prog", ahora está bien.
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
int _tmain()
{
char * pCmd = ::GetCommandLine();
// skip the executable
if (*pCmd++ == L'"')
{
while (*pCmd++ != L'"');
}
else
{
while (*pCmd != NULL && *pCmd != L' ')
++pCmd;
}
while (*pCmd == L' ')
pCmd++;
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
ZeroMemory(&pi, sizeof(pi));
// Start the child process.
BOOL result = CreateProcess
(
NULL, // No module name (use command line)
pCmd, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set bInheritHandles to FALSE
DETACHED_PROCESS, // Detach process
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi // Pointer to PROCESS_INFORMATION structure (returned)
);
if (result) return 0;
char msg[2048];
FormatMessage
(
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
::GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT),
msg, sizeof(msg),
NULL
);
fputs(msg, stderr);
_flushall();
return -1;
}
Puede usted aclara qué problema estás tratando de resolver ¿Es realmente el caso que el enganche post-commit de subversión espera a que salgan todos los procesos? ¿Por qué no funciona 'start cmd/c startWebLogic.cmd'? – Cheeso
start cmd/c no funciona porque SVN post-commit hook esperará el hook y el proceso ** child ** creado por la salida hook. Es el diseño de SVN. He encontrado una solución, consulte: http://svn.haxx.se/users/archive-2008-11/0301.shtml – zhongshu