bug: redundant double close on PTY console socket in cmd/urunc/create.go

Open Beginner friendly
#964 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

The issue names cmd/urunc/create.go and createUnikontainer(); start by inspecting the Unix-socket connection setup there. Remove the redundant close registration so the connection is closed once, then run the repository's relevant checks and confirm the create path still handles the dialed console socket.

Written by the indexing model from the issue text.

Description

Description

In cmd/urunc/create.go, createUnikontainer() dials the console Unix socket and registers two defer close calls on the same connection:

conn, err := net.Dial("unix", consoleSocket)
if err != nil {
    return err
}
defer conn.Close()

uc, ok := conn.(*net.UnixConn)
if !ok {
    return err
}
defer uc.Close()
Dominant language
Go
Stars
298
Forks
202
Avg merge
2d 18h
Merged PRs (30d)
28

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from urunc-dev/urunc

All issues in urunc-dev/urunc

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.