OSSubprocess
OSSubprocess copied to clipboard
Cannot terminate Process
Hi,
When i try to terminate OS processes, the Terminating use case is working with this code :
newprocess := OSWSWinProcess new
shellCommand: 'cmd.exe';
run.
newprocess terminate.
But if i wait the cmd.exe startup or with a Delay between shellCommand and terminate... it fails :
newprocess := OSWSWinProcess new
shellCommand: 'cmd.exe';
run.
5 seconds wait.
newprocess terminate.
if i run the terminate using the hProcess of the newprocess processInfo... it doesn't work anymore ?
OSWSWinProcessLibrary uniqueInstance terminate: newprocess processInfo hProcess exitCode: 0.
Please help ?