Skip to content

Remove #include <unistd.h> from various files that use getpid(). Instead provide platform'ized version of getpid() #599

Description

@gapisback

This cleanup comment comes out of the review cycle for PR #568 . See this comment from @rtjohnso


I think all the other instances of #include <unistd.h> were introduced by you in the previous PR for multi-process support. We need to clean them all out by platformizing getpid.


Solution that will be attempted:

  • Add platform_getpid() in platform_linux/platform_inline.h, defined as OS getpid()
  • Use platform_getpid() everywhere getpid() is being used now.
  • Will need to #include <unistd.h> in above .h

This seems like it will work ... try it out.

Activity

  1. self-assigned this
    on Nov 10, 2023
  2. added
    code-cleanupMinor corrections, improvements, code-cleanup; not necessarily a bug per se.
    on Nov 10, 2023
  3. gapisback commented on Nov 10, 2023

    @gapisback
    ContributorAuthor

    @rtjohnso -- This is the clean-up issue you raised. Let me know if the proposed solution is acceptable to you. I'll get to this after part-3 lands.

  4. added 2 commits that reference this issue on Jan 27, 2024
  5. added a commit that references this issue on Jan 29, 2024
  6. added a commit that references this issue on Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

code-cleanupMinor corrections, improvements, code-cleanup; not necessarily a bug per se.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions