Commit 6ba48cc9 authored by pianofab's avatar pianofab
Browse files

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
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -84,7 +84,11 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
#else  // Other Unices just use fork

  pid = fork();
  if (pid==-1) return -1;
  if (pid==-1)
  {
    perror("fork error");
	  return -1;
  }
  if (pid==0)
  {
    const char * argv[4];