Commit 6ba48cc9 authored by pianofab's avatar pianofab

Report details about fork() failure in logs.

When parsing a large codebase dot failed to start. Adding this line helped narrow down the issue. Increasing my VirtualBox VM RAM size worked around the issue. A proper fix would be to spawn separate processes without using fork() so they don't start with the giant address space used by the current process.
parent 40b84627
...@@ -84,7 +84,11 @@ int portable_system(const char *command,const char *args,bool commandHasConsole) ...@@ -84,7 +84,11 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
#else // Other Unices just use fork #else // Other Unices just use fork
pid = fork(); pid = fork();
if (pid==-1) return -1; if (pid==-1)
{
perror("fork error");
return -1;
}
if (pid==0) if (pid==0)
{ {
const char * argv[4]; const char * argv[4];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment