Source file src/runtime/net_plan9.go

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  import (
     8  	_ "unsafe"
     9  )
    10  
    11  //go:linkname runtime_ignoreHangup internal/poll.runtime_ignoreHangup
    12  func runtime_ignoreHangup() {
    13  	getg().m.ignoreHangup = true
    14  }
    15  
    16  //go:linkname runtime_unignoreHangup internal/poll.runtime_unignoreHangup
    17  func runtime_unignoreHangup(sig string) {
    18  	getg().m.ignoreHangup = false
    19  }
    20  
    21  func ignoredNote(note *byte) bool {
    22  	if note == nil {
    23  		return false
    24  	}
    25  	if gostringnocopy(note) != "hangup" {
    26  		return false
    27  	}
    28  	return getg().m.ignoreHangup
    29  }
    30  

View as plain text