OSSubprocess icon indicating copy to clipboard operation
OSSubprocess copied to clipboard

Cannot terminate Process

Open ELePors opened this issue 11 months ago • 0 comments

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 ?

ELePors avatar Mar 13 '24 12:03 ELePors