I am running a variety of processes on a Windows server ( a mix of batch files, java, perl, csharp scripts/applications). These processes are launched using Autosys. The autosys agent on Windows always prefixes the command I provide in the job definition with 'cmd /c' (see example below)
C:\Windows\system32\cmd.exe /C foobar.exe
This by itself is not a problem, but when I try to kill job by sending an autosys KILLJOB event (that as per Autosys documentation sends a interrupt followed by kill signal to the process), the foobar.exe is not killed, it is the parent cmd.exe that gets killed. foobar.exe ends up as an orphan process and we need to then login to the server to terminate it using Task manager manually.
Does anyone have any solution so that the terminate signals from autosys propagate to the actual process ?
Thanks.