| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/go/src/internal/testpty/ |
Upload File : |
// Copyright 2017 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 testpty is a simple pseudo-terminal package for Unix systems,
// implemented by calling C functions via cgo.
package testpty
import (
"errors"
"fmt"
"os"
)
type PtyError struct {
FuncName string
ErrorString string
Errno error
}
func ptyError(name string, err error) *PtyError {
return &PtyError{name, err.Error(), err}
}
func (e *PtyError) Error() string {
return fmt.Sprintf("%s: %s", e.FuncName, e.ErrorString)
}
func (e *PtyError) Unwrap() error { return e.Errno }
var ErrNotSupported = errors.New("testpty.Open not implemented on this platform")
// Open returns a control pty and the name of the linked process tty.
//
// If Open is not implemented on this platform, it returns ErrNotSupported.
func Open() (pty *os.File, processTTY string, err error) {
return open()
}