Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for closeHandle (0.31 sec)

  1. src/cmd/cgo/internal/test/issue8517_windows.c

    		testHandleLeaksCallback();
    	}
    	return 0;
    }
    
    void testHandleLeaks()
    {
    	HANDLE h;
    	h = CreateThread(NULL, 0, &testHandleLeaksFunc, 0, 0, NULL);
    	WaitForSingleObject(h, INFINITE);
    	CloseHandle(h);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 517 bytes
    - Viewed (0)
  2. src/os/exec_nohandle.go

    // Copyright 2024 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !linux && !windows
    
    package os
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 238 bytes
    - Viewed (0)
  3. src/os/exec_windows.go

    		return syscall.EINVAL
    	}
    
    	// no need for a finalizer anymore
    	runtime.SetFinalizer(p, nil)
    	return nil
    }
    
    func (p *Process) closeHandle() {
    	syscall.CloseHandle(syscall.Handle(p.handle))
    }
    
    func findProcess(pid int) (p *Process, err error) {
    	const da = syscall.STANDARD_RIGHTS_READ |
    		syscall.PROCESS_QUERY_INFORMATION | syscall.SYNCHRONIZE
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/cthread_windows.c

    		nthread = MaxThread;
    	for(i=0; i<nthread; i++)
    		thread_id[i] = _beginthreadex(0, 0, addThread, &max, 0, 0);
    	for(i=0; i<nthread; i++) {
    		WaitForSingleObject((HANDLE)thread_id[i], INFINITE);
    		CloseHandle((HANDLE)thread_id[i]);
    	}
    }
    
    __stdcall
    static unsigned int
    goDummyCallbackThread(void* p)
    {
    	int i, max;
    
    	max = *(int*)p;
    	for(i=0; i<max; i++)
    		goDummy();
    	return 0;
    }
    
    int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  5. src/os/exec_linux.go

    // Copyright 2024 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package os
    
    import (
    	"syscall"
    )
    
    func (p *Process) closeHandle() {
    	syscall.Close(int(p.handle))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 261 bytes
    - Viewed (0)
  6. src/runtime/pprof/proto_windows.go

    	snap, err := createModuleSnapshot()
    	if err != nil {
    		// pprof expects a map entry, so fake one, when we haven't added anything yet.
    		b.addMappingEntry(0, 0, 0, "", "", true)
    		return
    	}
    	defer func() { _ = syscall.CloseHandle(snap) }()
    
    	var module windows.ModuleEntry32
    	module.Size = uint32(windows.SizeofModuleEntry32)
    	err = windows.Module32First(snap, &module)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:59 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  7. src/syscall/syscall_windows_test.go

    		t.Fatalf("Open failed: %v", err)
    	}
    	syscall.CloseHandle(h)
    	h, err = syscall.Open(dir, syscall.O_RDONLY|syscall.O_TRUNC, 0)
    	if err == nil {
    		t.Error("Open should have failed")
    	} else {
    		syscall.CloseHandle(h)
    	}
    	h, err = syscall.Open(dir, syscall.O_RDONLY|syscall.O_CREAT, 0)
    	if err == nil {
    		t.Error("Open should have failed")
    	} else {
    		syscall.CloseHandle(h)
    	}
    }
    
    func TestComputerName(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 16:33:09 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  8. src/internal/fuzz/sys_windows.go

    	addr, err := syscall.MapViewOfFile(
    		mapObj,        // handle
    		access,        // access
    		0,             // offsetHigh
    		0,             // offsetLow
    		uintptr(size), // length
    	)
    	if err != nil {
    		syscall.CloseHandle(mapObj)
    		return nil, err
    	}
    
    	region := unsafe.Slice((*byte)(unsafe.Pointer(addr)), size)
    	return &sharedMem{
    		f:             f,
    		region:        region,
    		removeOnClose: removeOnClose,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:35:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  9. src/internal/poll/fd_windows_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	fd := poll.FD{Sysfd: s, IsStream: true, ZeroReadIsEOF: true}
    	_, err = fd.Init("tcp", true)
    	if err != nil {
    		syscall.CloseHandle(s)
    		t.Fatal(err)
    	}
    	defer fd.Close()
    
    	const SIO_TCP_INFO = syscall.IOC_INOUT | syscall.IOC_VENDOR | 39
    	inbuf := uint32(0)
    	var outbuf _TCP_INFO_v0
    	cbbr := uint32(0)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 14 08:33:36 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. src/runtime/testdata/testwinlibthrow/veh.c

    L16:
    L17:__declspec(dllexport)
    L18:void ThreadRaiseNoExcept(void)
    L19:{
    L20:    HANDLE thread = CreateThread(0, 0, ThreadRaiser,  0, 0, 0);
    L21:    if (0 != thread)
    L22:    {
    L23:        WaitForSingleObject(thread, INFINITE);
    L24:        CloseHandle(thread);
    L25:    }
    L26:}
    ...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 20 18:45:28 UTC 2022
    - 470 bytes
    - Viewed (0)
Back to top