Skip to content

Commit

Permalink
Merge pull request #72 from pocek/fix-field-order
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored Apr 14, 2023
2 parents ed05d1f + c992033 commit 6ccc3cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/72.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a regression causing ``ShellDetectionFailure`` if ``/proc`` is used for process lookup.
4 changes: 2 additions & 2 deletions src/shellingham/posix/proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def _get_stat(pid, name):
parts = STAT_PATTERN.findall(f.read())
# We only care about TTY and PPID -- both are numbers.
if _use_bsd_stat_format():
return parts[BSD_STAT_PPID], parts[BSD_STAT_TTY]
return parts[LINUX_STAT_PPID], parts[LINUX_STAT_TTY]
return parts[BSD_STAT_TTY], parts[BSD_STAT_PPID]
return parts[LINUX_STAT_TTY], parts[LINUX_STAT_PPID]


def _get_cmdline(pid):
Expand Down

0 comments on commit 6ccc3cb

Please sign in to comment.