You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/05/29 12:29:19 UTC
svn commit: r779916 -
/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
Author: mturk
Date: Fri May 29 10:29:19 2009
New Revision: 779916
URL: http://svn.apache.org/viewvc?rev=779916&view=rev
Log:
Add a handy Sleep to the service so we can use this for pausing the batch scripts, because Windows is missing sleep utility
Modified:
commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
Modified: commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c?rev=779916&r1=779915&r2=779916&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c (original)
+++ commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c Fri May 29 10:29:19 2009
@@ -1320,6 +1320,18 @@
LPAPXCMDLINE lpCmdline;
+ if (argc > 1 && strncmp(argv[1], "//PP//", 6) == 0) {
+ /* Handy sleep routine defaulting to 1 minute */
+ DWORD ss = 60;
+ if (argv[1][6]) {
+ int us = atoi(argv[1] + 6);
+ if (us > 0)
+ ss = (DWORD)us;
+ }
+ Sleep(ss * 1000);
+ ExitProcess(0);
+ return;
+ }
apxHandleManagerInitialize();
/* Create the main Pool */
gPool = apxPoolCreate(NULL, 0);