Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log process id #54

Merged
merged 7 commits into from
Jun 9, 2021
Merged

Log process id #54

merged 7 commits into from
Jun 9, 2021

Conversation

GTANAdam
Copy link
Contributor

@GTANAdam GTANAdam commented Jun 9, 2021

I don't think this needs any description

@SebMoore
Copy link
Contributor

SebMoore commented Jun 9, 2021

Nice idea. This could be really useful.

@larryhopecode
Copy link

nice work

@madMAx43v3r
Copy link
Owner

I can already see all the complaints about it not compiling on everybodys machine, can you surround that with an #ifdef to make sure the function and the header exists?

@GTANAdam
Copy link
Contributor Author

GTANAdam commented Jun 9, 2021

I haven't tested on Windows yet, but the API seems to point that it returns a DWORD, so it must work.

src/chia_plot.cpp Outdated Show resolved Hide resolved
#include <processthreadsapi.h>
#define GETPID GetCurrentProcessId
#else
#define GETPID
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that won't compile, how about: #define GETPID() int(-1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies, I haven't tested it so I had no idea about that.

@madMAx43v3r madMAx43v3r merged commit ba97f9a into madMAx43v3r:master Jun 9, 2021
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.

4 participants