Skip to content

Conversation

@ekilmer
Copy link
Contributor

@ekilmer ekilmer commented Mar 5, 2025

For me, this fixed debugging with lldb under macOS on AppleSilicon.

This is also a general pattern found other code bases, including well-established
code bases like the dpkg source code:

Note that the above link actually compares the return value of waitpid
against all negative values (child < 0). This was made to pacify
static anlyzers in commit 5601b476929a896e1ab67e66e1192d5a90346e75 and
is not any more correct than comparison against the documented return
value of -1 for error.

For me, this fixed debugging with lldb under macOS on AppleSilicon.

This is also a general pattern found other code bases, including well-established
code bases like the dpkg source code:
  - https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/utils/start-stop-daemon.c?h=1.22.15#n564
  - v1.22.15 is the latest version at time of commit

Note that the above link actually compares the return value of waitpid
against all negative values (`child < 0`). This was made to pacify
static anlyzers in commit 5601b476929a896e1ab67e66e1192d5a90346e75 and
is not any more correct than comparison against the documented return
value of `-1` for error.
  - https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=5601b476929a896e1ab67e66e1192d5a90346e75
@ekilmer ekilmer force-pushed the ek/waitpid-eintr branch from 25ea6d6 to 52be4e8 Compare March 5, 2025 16:17
@BillyONeal BillyONeal merged commit 61d0793 into microsoft:main Mar 5, 2025
6 checks passed
@BillyONeal
Copy link
Member

Seems reasonable, thank you!

@ekilmer ekilmer deleted the ek/waitpid-eintr branch March 5, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants