Skip to content

ps: Git-Bash-compatible listing face + -W/--windows (WINPID column) (niubash#993 S5) #1785

Closed

Description

@caomengxuan666

From the niubash Git-Bash drop-in audit (unixwin/niubash#993, row S5): niu -c 'ps -W' fails — the flag is unsupported — and the default ps listing uses a Windows-specific layout with no WINPID column.

Git Bash (Cygwin ps) shape:

      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
  4194308       0       0          4  ?              0   Nov  5 System

Scope:

  • accept -W/--windows: list all Windows processes system-wide (no session/user restriction), Cygwin-shaped columns PID PPID PGID WINPID TTY UID STIME COMMAND
  • give the default ps listing the same Cygwin-shaped face (WINPID column)
  • COMMAND shows the native image path for Windows rows (C:\Windows\...) and the shell-mount spelling (/usr/bin/...) for processes inside the shell root, like Cygwin does for its own processes

niubash has no second PID namespace, so PID == WINPID == the real Windows PID (Cygwin's +0x400000 marker exists only to separate its synthetic pid space).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcompat-gap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions