summaryrefslogtreecommitdiffstats
path: root/src/portable.cpp
diff options
context:
space:
mode:
authorpianofab <pianofab+github@gmail.com>2013-12-11 02:45:45 (GMT)
committerpianofab <pianofab+github@gmail.com>2013-12-11 02:45:45 (GMT)
commit6ba48cc940501af140600450088da0680e95d6f0 (patch)
tree7feb236e3384fbd752897418f0e4910976306e94 /src/portable.cpp
parent40b84627bdad3b1e03c0a6c603c6a7e299ce04c0 (diff)
downloadDoxygen-6ba48cc940501af140600450088da0680e95d6f0.zip
Doxygen-6ba48cc940501af140600450088da0680e95d6f0.tar.gz
Doxygen-6ba48cc940501af140600450088da0680e95d6f0.tar.bz2
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.
Diffstat (limited to 'src/portable.cpp')
-rw-r--r--src/portable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/portable.cpp b/src/portable.cpp
index 7b78439..258c50f 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -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];