Skip to content

Conversation

devhyper
Copy link
Contributor

@devhyper devhyper commented May 6, 2022

Resolves #3911

@selsta
Copy link
Collaborator

selsta commented May 7, 2022

#3911 (comment) should work as a workaround.

@devhyper
Copy link
Contributor Author

Just tested on linux, will test on windows too.

@devhyper
Copy link
Contributor Author

devhyper commented May 11, 2022

I'm trying to get the PID of monerod on Windows using tasklist, however whenever I run it using QProcess no output is ever written.

QProcess p;
QStringList tempArgs;
tempArgs << "/FI";  
tempArgs << "\"IMAGENAME eq monerod.exe\"";
tempArgs << "/FO";
tempArgs << "LIST";
p.setProgram("tasklist");
p.setArguments(tempArgs);
p.start();
p.waitForFinished();
QString tasklist = p.readAllStandardOutput();

tasklist is still an empty QString after running.
@selsta any ideas?

EDIT: I think I can use wmic with the imagename directly, no need for tasklist.

@devhyper devhyper force-pushed the second-instance-wrong-args branch from 2a83c02 to 35b72d5 Compare May 12, 2022 04:36
@devhyper
Copy link
Contributor Author

Running wmic using QProcess didn't produce any output, so I tried a powershell cmdlet, and interestingly that worked.

@devhyper devhyper marked this pull request as ready for review May 12, 2022 04:38
@devhyper
Copy link
Contributor Author

Tested on windows and linux.

@devhyper
Copy link
Contributor Author

devhyper commented Jun 1, 2022

#3936

@devhyper devhyper closed this Jun 1, 2022
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.

monerod second instance started by GUI
2 participants