コード例 #1
0
func (d *SubprocessData) Unfreeze() error {
	hThread := d.platformData.hThread
	var err error
	retries := 10
	for {
		var oldCount int
		retries--
		oldCount, err = win32.ResumeThread(hThread)
		if oldCount <= 1 && err == nil {
			break
		}
		log.Errorf("unfreeze: oldcount %d, error %s", oldCount, err)
		if retries <= 0 {
			// crash
			log.Fatalf("UNSUSPEND FAILED, CRASHING")
		}
		time.Sleep(time.Second / 10)
	}
	syscall.CloseHandle(hThread)
	return nil
}
コード例 #2
0
func (d *SubprocessData) Unfreeze() error {
	hThread := d.platformData.hThread
	win32.ResumeThread(hThread)
	syscall.CloseHandle(hThread)
	return nil
}