Hi, If you don't start it asynchronously (or change to use a <process>), is the RC in the STAX job what you expected? In general we recommend that you always use <process> to start processes in a STAX job (not <stafcmd>).
Could you provide a real reproduction scenario for Windows, that we could
try? For example, the following works as expected for me:
C:\>STAF local PROCESS START COMMAND "java unknownTestClass" NOTIFY ONEND
Response
--------
55
C:\>STAF local PROCESS QUERY HANDLE 55
Response
--------
Handle : 55
Handle Name : <None>
Title : <None>
Workload : <None>
Shell : <None>
Command : java unknownTestClass
Parms : <None>
Workdir : <None>
Focus : Background
User Name : <None>
Key : <None>
PID : 5932
Start Mode : Async
Start Date-Time: 20100923-09:46:47
End Date-Time : 20100923-09:46:48
Return Code : 1
Thanks,
David
David Bender 11501 Burnet Rd. Phone (T/L): 1-512-286-5315
STAF/STAX Development Bldg. 903-5B002 (363-5315)
Austin, TX ITN: 23635315
IBM Software Group, 78758-3400 Email: [email protected]
WPLC
From: Simon McQueen <[email protected]>
To: [email protected]
Date: 09/23/2010 09:32 AM
Subject: [staf-users] Detecting that an ASYNC started process has failed
to start - STAF 3.4.2 / STAX 3.4.3
Hi all,
I'm starting a process asynchronously from STAX via a <stafcmd /> to the
PROCESS service with a request like:
STAF ... PROCESS START COMMAND ... NOTIFY ONEND ...
So this defaults to starting the process asynchronously and doesn't wait
for the process to complete.
What I've found is that on win32 if the process completely fails to
start, say for example because a required .dll is not on the PATH, tnen
when I come to later check back on the process with:
STAF ... PROCESS QUERY HANDLE <handle>
The returned process info looks something like:
{
'rc': None,
'endTimestamp': None,
'command':
'F:\\worgit\\ospli\\testsuite\\tests\\hello\\ccpp_hello_pub',
'startMode': 'Async',
'pid': '2660',
'startTimestamp': '20100923-14:34:46',
'workload': None,
'handle': '91',
'staf-map-class-name': 'STAF/Service/Process/ProcessInfo',
'shell': None,
'userName': None,
'title': None,
'parms': '-ORBListenEndpoints iiop://:23232 -ORBInitRef
ccpp_hello_sub=corbaloc:iiop:rhel53a:23233/ccpp_hello_sub',
'key': '1',
'handleName': None,
'focus': 'Background',
'workdir': 'F:\\worgit\\ospli\\testsuite\\tests\\hello'
}
... i.e. the rc is None, there is a PID, & there is no endTimeStamp. So,
it's basically indistinguishable from a running process.
This contrasts with Linux where you can see:
{
'rc': '127',
'endTimestamp': '20100923-14:22:16',
'command': '/home/dds/sm/ospli/testsuite/tests/hello/ccpp_hello_pub',
'startMode': 'Async',
'pid': '12461',
'startTimestamp': '20100923-14:22:15',
'workload': None,
'handle': '112',
'staf-map-class-name': 'STAF/Service/Process/ProcessInfo',
'shell': None,
'userName': None,
'title': None,
'parms': '-ORBListenEndpoints iiop://:23232 -ORBInitRef
ccpp_hello_sub=corbaloc:iiop:beatrice:23233/ccpp_hello_sub',
'key': '1',
'handleName': None,
'focus': 'Background',
'workdir': '/home/dds/sm/ospli/testsuite/tests/hello'
}
... so a non zero return is present and an endTimeStamp.
Can you tell me please, is this by design and / or is there a workaround
or other way of detecting if an async process has failed to start on
win32 ?
Cheers,
--
Simon McQueen
e-mail: mailto:[email protected]
Tele: +44-191-497-9966
Web: http://www.prismtech.com
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America
contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in
marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________ staf-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/staf-users
