Skip to content

Colonless UDS socket path auto-detects as a serial tty #22

Description

@jeonghanlee

Colonless UDS socket path auto-detects as a serial tty

Milestone

Backlog

Labels

enhancement, P3-low, area/uds

Summary

With no flag, con decides socket-vs-tty by colon presence (con.cpp:577): a target with no colon is treated as a serial tty. So con /tmp/foo.sock (a real UNIX socket file with no colon) is opened as a serial device instead of a socket. This is the inverse facet of #4's colon overload.

Root Cause

con.cpp:577strchr(TargetCon, ':') is the only socket-vs-tty signal.

Proposed Fix (constraint)

A path-shape (/-present) signal must NOT be used here: every serial device (/dev/ttyS0, /dev/ttyUSB0) contains a slash, so path-shape would route serial consoles into the socket branch and break con's primary mode. The viable signals are stat()/S_ISSOCK (asymmetric for a fresh server socket; TOCTOU/symlink caveats) or the explicit -u flag (see the -u issue).

Acceptance Criteria

  • A colonless UNIX socket path can be reached without being misread as a serial device, without regressing /dev/tty* auto-detect.

Out of Scope

The colon-bearing UDS misroute (M1/#4). M1 deliberately does not touch site 577.

Surfaced during the M1 (#4) review session, 2026-06-22; path-shape ruled out by reviewers.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions