diff options
author | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-19 15:32:11 -0300 |
---|---|---|
committer | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-19 15:32:11 -0300 |
commit | 7ad2637a0b617e2c0381524e0e1160cacac28bd3 (patch) | |
tree | 07d0b82a2b58db9bf762b5ee6a6c12b3bde4d6c8 | |
parent | 0638db8613a4ecf8b0ef1da1bd625f9b5732d4e9 (diff) |
aptcc: Use _exit() to quit the child process as synaptic does
-rw-r--r-- | backends/aptcc/apt-intf.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/backends/aptcc/apt-intf.cpp b/backends/aptcc/apt-intf.cpp index 47b01e9c..bd471de7 100644 --- a/backends/aptcc/apt-intf.cpp +++ b/backends/aptcc/apt-intf.cpp @@ -2609,10 +2609,9 @@ bool AptIntf::installPackages(AptCacheFile &cache, bool simulating) // dump errors into cerr (pass it to the parent process) _error->DumpErrors(); - close(readFromChildFD[1]); - close(pty_master); - - return res == 0; + // finishes the child process, _exit is used to not + // close some parent file descriptors + _exit(res); } cout << "PARENT proccess running..." << endl; @@ -2635,6 +2634,8 @@ bool AptIntf::installPackages(AptCacheFile &cache, bool simulating) } close(readFromChildFD[0]); + close(readFromChildFD[1]); + close(pty_master); cout << "Parent finished..." << endl; return true; |