mirror of https://github.com/wolfSSL/wolfssh.git
add Windows version of getpid
parent
74ca7161a5
commit
12b7c3af93
|
@ -1451,7 +1451,11 @@ void wolfSSHD_ConfigSavePID(const WOLFSSHD_CONFIG* conf)
|
|||
|
||||
WMEMSET(buf, 0, sizeof(buf));
|
||||
if (WFOPEN(NULL, &f, conf->pidFile, "wb") == 0) {
|
||||
#ifndef WIN32
|
||||
WSNPRINTF(buf, sizeof(buf), "%d", getpid());
|
||||
#else
|
||||
WSNPRINTF(buf, sizeof(buf), "%d", _getpid());
|
||||
#endif
|
||||
WFWRITE(NULL, buf, 1, WSTRLEN(buf), f);
|
||||
WFCLOSE(NULL, f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue