Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: creack/pty
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.21
Choose a base ref
...
head repository: creack/pty
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.23
Choose a head ref
  • 7 commits
  • 5 files changed
  • 3 contributors

Commits on Dec 9, 2023

  1. Copy the full SHA
    bb5f79c View commit details
  2. Copy the full SHA
    2711aac View commit details
  3. add notes to README.md

    WeidiDeng committed Dec 9, 2023
    Copy the full SHA
    f3f519e View commit details
  4. Merge pull request #180 from WeidiDeng/non-blocking

    Add non-blocking notes
    creack authored Dec 9, 2023
    Copy the full SHA
    03db72c View commit details

Commits on Feb 28, 2024

  1. ztypes_openbsd_32bit_int.go: remove arch list

    struct ptmget is common across all OpenBSD architectures.
    The current version needlessly breaks compilation on ppc64 and riscv64.
    n2vi committed Feb 28, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3c9ed8d View commit details
  2. Merge pull request #189 from n2vi/openbsd-arch-free

    ztypes_openbsd_32bit_int.go: remove arch list
    creack authored Feb 28, 2024
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    08e77a0 View commit details

Commits on Aug 13, 2024

  1. Fix go.mod

    creack committed Aug 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2cde18b View commit details
Showing with 11 additions and 9 deletions.
  1. +1 −1 .github/workflows/test.yml
  2. +1 −1 README.md
  3. +1 −1 go.mod
  4. +7 −4 io_test.go
  5. +1 −2 ztypes_openbsd_32bit_int.go
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -57,4 +57,4 @@ jobs:
# Run the tests again 100 times without verbose.
- if: ${{ matrix.go_version != '1.6.x' }}
name: Many Tests
run: go test -count=100 -timeout=10s
run: go test -count=100 -timeout=30s
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ go get github.com/creack/pty

## Examples

Note that those examples are for demonstration purpose only, to showcase how to use the library. They are not meant to be used in any kind of production environment.
Note that those examples are for demonstration purpose only, to showcase how to use the library. They are not meant to be used in any kind of production environment. If you want to **set deadlines to work** and `Close()` **interrupting** `Read()` on the returned `*os.File`, you will need to call `syscall.SetNonblock` manually.

### Command

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/creack/pty/v2
module github.com/creack/pty

go 1.18
11 changes: 7 additions & 4 deletions io_test.go
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import (
"os"
"runtime"
"sync"
"syscall"
"testing"
"time"
)
@@ -28,9 +29,10 @@ var glTestFdLock sync.Mutex
//
//nolint:paralleltest // Potential in (*os.File).Fd().
func TestReadDeadline(t *testing.T) {
t.Skip("Disabling while investigating race.")

ptmx, success := prepare(t)
if err := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
t.Fatalf("Error: set non block: %s", err)
}

if err := ptmx.SetDeadline(time.Now().Add(timeout / 10)); err != nil {
if errors.Is(err, os.ErrNoDeadline) {
@@ -59,9 +61,10 @@ func TestReadDeadline(t *testing.T) {
//
//nolint:paralleltest // Potential in (*os.File).Fd().
func TestReadClose(t *testing.T) {
t.Skip("Disabling while investigating race.")

ptmx, success := prepare(t)
if err := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
t.Fatalf("Error: set non block: %s", err)
}

go func() {
time.Sleep(timeout / 10)
3 changes: 1 addition & 2 deletions ztypes_openbsd_32bit_int.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build (386 || amd64 || arm || arm64 || mips64) && openbsd
// +build 386 amd64 arm arm64 mips64
//go:build openbsd
// +build openbsd

package pty