mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Add an error message and don't add child process for invalid ident
This commit is contained in:
@@ -1726,6 +1726,13 @@ void RenderDoc::FinishCaptureWriting(RDCFile *rdc, uint32_t frameNumber)
|
||||
|
||||
void RenderDoc::AddChildProcess(uint32_t pid, uint32_t ident)
|
||||
{
|
||||
if(ident == 0 || ident == m_RemoteIdent)
|
||||
{
|
||||
RDCERR("Child process %u returned invalid ident %u. Possibly too many listen sockets in use!",
|
||||
pid, ident);
|
||||
return;
|
||||
}
|
||||
|
||||
SCOPED_LOCK(m_ChildLock);
|
||||
m_Children.push_back(make_rdcpair(pid, ident));
|
||||
}
|
||||
|
||||
@@ -146,6 +146,9 @@ __attribute__((visibility("default"))) pid_t fork()
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
if(ident == ownIdent)
|
||||
ident = 0;
|
||||
|
||||
RDCLOG("PID %u has ident %u", ret, ident);
|
||||
|
||||
RenderDoc::Inst().AddChildProcess((uint32_t)ret, (uint32_t)ident);
|
||||
|
||||
Reference in New Issue
Block a user