mirror of https://github.com/dapr/cli.git
build failure
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
This commit is contained in:
parent
25a9b629a4
commit
20c34af652
|
|
@ -49,7 +49,8 @@ func StopAppsWithRunFile(runTemplatePath string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func disposeJobHandle(cliPID int) error {
|
func disposeJobHandle(cliPID int) error {
|
||||||
jbobj, err := winjob.Open(strconv.Itoa(cliPID) + "-" + utils.WindowsDaprAppProcJobName)
|
jobObjectName := utils.GetJobObjectNameFromPID(strconv.Itoa(cliPID))
|
||||||
|
jbobj, err := winjob.Open(jobObjectName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error opening job object: %w", err)
|
return fmt.Errorf("error opening job object: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -413,8 +413,13 @@ func SanitizeDir(destDir string) string {
|
||||||
return strings.ReplaceAll(destDir, "'", "''")
|
return strings.ReplaceAll(destDir, "'", "''")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach Job object to App Process
|
// Attach Job object to App Process.
|
||||||
func AttachJobObjectToProcess(pid string, proc *os.Process) {
|
func AttachJobObjectToProcess(pid string, proc *os.Process) {
|
||||||
// Attach a job object to the app process.
|
// Attach a job object to the app process.
|
||||||
daprsyscall.AttachJobObjectToProcess(pid+"-"+windowsDaprAppProcJobName, proc)
|
daprsyscall.AttachJobObjectToProcess(GetJobObjectNameFromPID(pid), proc)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetJobObjectNameFromPID returns the name of the Windows job object that is used to manage the Daprized app's processes on windows.
|
||||||
|
func GetJobObjectNameFromPID(pid string) string {
|
||||||
|
return pid + "-" + windowsDaprAppProcJobName
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue