parent_exe_file_windows

Function parent_exe_file_windows 

Source
fn parent_exe_file_windows() -> Option<String>
Expand description

Walk the Toolhelp32 process snapshot in a single pass to:

  1. Find the current PID’s entry → record th32ParentProcessID.
  2. Find the entry where th32ProcessID == parent_pid → capture its szExeFile.

Uses PROCESSENTRY32W.szExeFile (a fixed 260-wide-char buffer of the executable’s filename only, no path) rather than QueryFullProcessImageNameW. Per codex P2 on PR #882 round 2, the latter could fail when a Windows checkout’s staged launcher path exceeds MAX_PATH — szExeFile is filename-only and never hits that limit.