summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/contrib/arfile.cc3
-rw-r--r--apt-pkg/algorithms.cc12
-rw-r--r--apt-pkg/contrib/sha2_internal.cc12
-rw-r--r--apt-pkg/depcache.cc13
-rw-r--r--apt-pkg/packagemanager.cc12
-rw-r--r--debian/changelog11
-rw-r--r--doc/examples/configure-index2
-rw-r--r--test/integration/Packages-pdiff-usage2
-rw-r--r--test/integration/Packages-pdiff-usage-new2
-rw-r--r--test/integration/Packages-releasefile-verification1
-rw-r--r--test/integration/Packages-releasefile-verification-new1
-rw-r--r--test/integration/framework18
-rwxr-xr-xtest/integration/test-bug-590041-prefer-non-virtual-packages2
-rwxr-xr-xtest/integration/test-bug-601016-description-translation31
-rwxr-xr-xtest/integration/test-cve-2013-1051-InRelease-parsing2
-rwxr-xr-xtest/integration/test-pdiff-usage2
-rwxr-xr-xtest/integration/test-releasefile-verification4
-rw-r--r--test/interactive-helper/aptwebserver.cc37
18 files changed, 128 insertions, 39 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 2dee1a40d..d7ee528ba 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -106,7 +106,10 @@ bool ARArchive::LoadHeaders()
return _error->Error(_("Invalid archive member header"));
}
if (File.Read(S,Len) == false)
+ {
+ delete Memb;
return false;
+ }
S[Len] = 0;
Memb->Name = S;
Memb->Size -= Len;
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index d19783983..85799a11b 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -845,8 +845,10 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
}
while (Again == true);
- if (Debug == true)
- clog << "Starting" << endl;
+ if (Debug == true) {
+ clog << "Starting pkgProblemResolver with broken count: "
+ << Cache.BrokenCount() << endl;
+ }
MakeScores();
@@ -874,8 +876,10 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
}
}
- if (Debug == true)
- clog << "Starting 2" << endl;
+ if (Debug == true) {
+ clog << "Starting 2 pkgProblemResolver with broken count: "
+ << Cache.BrokenCount() << endl;
+ }
/* Now consider all broken packages. For each broken package we either
remove the package or fix it's problem. We do this once, it should
diff --git a/apt-pkg/contrib/sha2_internal.cc b/apt-pkg/contrib/sha2_internal.cc
index 83b5a98d3..f84fb761c 100644
--- a/apt-pkg/contrib/sha2_internal.cc
+++ b/apt-pkg/contrib/sha2_internal.cc
@@ -632,7 +632,7 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
}
/* Clean up state data: */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
usedspace = 0;
}
@@ -653,7 +653,7 @@ char *SHA256_End(SHA256_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA256_DIGEST_LENGTH);
return buffer;
@@ -969,7 +969,7 @@ void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
}
/* Zero out state data */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA512_End(SHA512_CTX* context, char buffer[]) {
@@ -989,7 +989,7 @@ char *SHA512_End(SHA512_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA512_DIGEST_LENGTH);
return buffer;
@@ -1044,7 +1044,7 @@ void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
}
/* Zero out state data */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA384_End(SHA384_CTX* context, char buffer[]) {
@@ -1064,7 +1064,7 @@ char *SHA384_End(SHA384_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA384_DIGEST_LENGTH);
return buffer;
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 5bed10d95..9f8422fec 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1251,9 +1251,16 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
PkgState[Pkg->ID].CandidateVer != *I &&
MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps) == true)
continue;
- else if ((Start->Type == pkgCache::Dep::Conflicts || Start->Type == pkgCache::Dep::DpkgBreaks) &&
- MarkDelete(Pkg,false,Depth + 1, false) == false)
- break;
+ else if (Start->Type == pkgCache::Dep::Conflicts ||
+ Start->Type == pkgCache::Dep::DpkgBreaks)
+ {
+ if(DebugAutoInstall == true)
+ std::clog << OutputInDepth(Depth)
+ << " Removing: " << Pkg.Name()
+ << std::endl;
+ if (MarkDelete(Pkg,false,Depth + 1, false) == false)
+ break;
+ }
}
continue;
}
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b8932753d..310934c42 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -420,11 +420,14 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
do
{
Changed = false;
- for (std::list<DepIterator>::iterator D = needConfigure.begin(); D != needConfigure.end(); ++D)
+ for (std::list<DepIterator>::const_iterator D = needConfigure.begin(); D != needConfigure.end(); ++D)
{
- // Compute a single dependency element (glob or)
+ // Compute a single dependency element (glob or) without modifying D
pkgCache::DepIterator Start, End;
- D->GlobOr(Start,End);
+ {
+ pkgCache::DepIterator Discard = *D;
+ Discard.GlobOr(Start,End);
+ }
if (End->Type != pkgCache::Dep::Depends)
continue;
@@ -483,9 +486,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
}
-
if (Bad == true && Changed == false && Debug == true)
- std::clog << OutputInDepth(Depth) << "Could not satisfy " << Start << std::endl;
+ std::clog << OutputInDepth(Depth) << "Could not satisfy " << *D << std::endl;
}
if (i++ > max_loops)
return _error->Error("Internal error: MaxLoopCount reached in SmartUnPack (2) for %s, aborting", Pkg.FullName().c_str());
diff --git a/debian/changelog b/debian/changelog
index bd25df1e2..4baa4d18d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,8 @@
-apt (0.9.8.3) UNRELEASED; urgency=low
+apt (0.9.9) unstable; urgency=low
+
+ [ Michael Vogt ]
+ * improve debug output for the Debug::pkgProblemResolver and
+ Debug::pkgDepCache::AutoInstall
[ David Kalnischkies ]
* build the en manpages in subdirectory doc/en
@@ -43,6 +47,11 @@ apt (0.9.8.2) unstable; urgency=low
* Fix crash when the "mirror" method does not find any entry
(closes: #699303)
+ [ Johan Kiviniemi ]
+ * cmdline/apt-key:
+ - Create new keyrings with mode 0644 instead of 0600.
+ - Accept a nonexistent --keyring file with the adv subcommand as well.
+
-- Michael Vogt <mvo@debian.org> Thu, 06 Jun 2013 19:15:14 +0200
apt (0.9.8.1) unstable; urgency=low
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index f75b5738a..f4d9d17f2 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -225,7 +225,7 @@ Acquire
Verify-Peer "false";
SslCert "/etc/apt/some.pem";
CaPath "/etc/ssl/certs";
- Verify-Host" "true";
+ Verify-Host "true";
AllowRedirect "true";
Timeout "120";
diff --git a/test/integration/Packages-pdiff-usage b/test/integration/Packages-pdiff-usage
index d1530a95c..ac962f29a 100644
--- a/test/integration/Packages-pdiff-usage
+++ b/test/integration/Packages-pdiff-usage
@@ -19,6 +19,7 @@ Description: Advanced front-end for dpkg
.
APT features complete installation ordering, multiple source capability
and several other unique features, see the Users Guide in apt-doc.
+Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
Package: oldstuff
Version: 1.0
@@ -32,3 +33,4 @@ SHA1: 3c695e028f74d5c544deeddaaa1242desa81088c
SHA256: b46fd1546151c545fe4bfa56a5cc0e7deaef23e2da3e4f129727fd660f28f050
Description: some cool but old stuff
This package will disappear in the next mirror update
+Description-md5: 1948af60eda0a41dfa9fe83f60eb8389
diff --git a/test/integration/Packages-pdiff-usage-new b/test/integration/Packages-pdiff-usage-new
index 4f374b37f..f8d7b1958 100644
--- a/test/integration/Packages-pdiff-usage-new
+++ b/test/integration/Packages-pdiff-usage-new
@@ -22,6 +22,7 @@ Description: Advanced front-end for dpkg
.
APT features complete installation ordering, multiple source capability
and several other unique features, see the Users Guide in apt-doc.
+Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
Package: newstuff
Version: 1.0
@@ -35,3 +36,4 @@ SHA1: 3c695e028f7a1ae324deeddaaa1242desa81088c
SHA256: b46fd154615edefab321cc56a5cc0e7deaef23e2da3e4f129727fd660f28f050
Description: some cool and shiny new stuff
This package will appear in the next mirror update
+Description-md5: d5f89fbbc2ac69c43d7e4c9b67d82b6b
diff --git a/test/integration/Packages-releasefile-verification b/test/integration/Packages-releasefile-verification
index 29a385f4f..eb7327279 100644
--- a/test/integration/Packages-releasefile-verification
+++ b/test/integration/Packages-releasefile-verification
@@ -16,3 +16,4 @@ Description: Advanced front-end for dpkg
.
APT features complete installation ordering, multiple source capability
and several other unique features, see the Users Guide in apt-doc.
+Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
diff --git a/test/integration/Packages-releasefile-verification-new b/test/integration/Packages-releasefile-verification-new
index e3b2edf1f..61509d157 100644
--- a/test/integration/Packages-releasefile-verification-new
+++ b/test/integration/Packages-releasefile-verification-new
@@ -19,3 +19,4 @@ Description: Advanced front-end for dpkg
.
APT features complete installation ordering, multiple source capability
and several other unique features, see the Users Guide in apt-doc.
+Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
diff --git a/test/integration/framework b/test/integration/framework
index 3a02cfb76..7dd7c20a7 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -605,9 +605,12 @@ buildaptarchivefromfiles() {
cat ${line} | bzip2 > ${line}.bz2
cat ${line} | xz --format=lzma > ${line}.lzma
cat ${line} | xz > ${line}.xz
+ if [ -n "$1" ]; then
+ touch -d "$1" ${line}.gz ${line}.bz2 ${line}.lzma ${line}.xz
+ fi
msgdone "info"
done
- generatereleasefiles
+ generatereleasefiles "$@"
}
# can be overridden by testcases for their pleasure
@@ -719,7 +722,10 @@ signreleasefiles() {
done
for RELEASE in $(find aptarchive/ -name Release); do
gpg --yes --no-default-keyring $SECKEYS $PUBKEYS --default-key "$SIGNER" -abs -o ${RELEASE}.gpg ${RELEASE}
- gpg --yes --no-default-keyring $SECKEYS $PUBKEYS --default-key "$SIGNER" --clearsign -o "$(echo "${RELEASE}" | sed 's#/Release$#/InRelease#')" $RELEASE
+ local INRELEASE="$(echo "${RELEASE}" | sed 's#/Release$#/InRelease#')"
+ gpg --yes --no-default-keyring $SECKEYS $PUBKEYS --default-key "$SIGNER" --clearsign -o $INRELEASE $RELEASE
+ # we might have set a specific date for the Release file, so copy it
+ touch -d "$(stat --format "%y" ${RELEASE})" ${RELEASE}.gpg ${INRELEASE}
done
msgdone "info"
}
@@ -728,8 +734,12 @@ changetowebserver() {
local LOG='/dev/null'
if test -x ${BUILDDIRECTORY}/aptwebserver; then
cd aptarchive
- LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver "$@" >$LOG 2>&1 &
- addtrap "kill $!;"
+ LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver -o aptwebserver::fork=1 "$@" >$LOG 2>&1
+ local PID="$(cat aptwebserver.pid)"
+ if [ -z "$PID" ]; then
+ msgdie 'Could not fork aptwebserver successfully'
+ fi
+ addtrap "kill $PID;"
cd - > /dev/null
elif [ $# -gt 0 ]; then
msgdie 'Need the aptwebserver when passing arguments for the webserver'
diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages
index e0dd7737f..0ce4c1413 100755
--- a/test/integration/test-bug-590041-prefer-non-virtual-packages
+++ b/test/integration/test-bug-590041-prefer-non-virtual-packages
@@ -9,6 +9,7 @@ pkglibc6="Package: libc6
Architecture: armel
Version: 2.11.2-2~0.3
Description: Embedded GNU C Library: Shared libraries
+Description-md5: b8c1e0561b75e2dc6b6482a99079c3e4
Filename: pool/main/e/eglibc/libc6_2.11.2-2_armel.deb
Installed-Size: 9740
MD5sum: f5b878ce5fb8aa01a7927fa1460df537
@@ -25,6 +26,7 @@ Architecture: i386
Version: 2.1.3-13~0.3
Replaces: libc6 (<< 2.2.5-13~0.3)
Description: The Berkeley database routines [glibc 2.0/2.1 compatibility]
+Description-md5: de1876f7fe7f7709a110875e145e38a8
Filename: pool/main/d/db1-compat/libdb1-compat_2.1.3-13_armel.deb
Installed-Size: 136
MD5sum: 4043f176ab2b40b0c01bc1211b8c103c
diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation
index 03fddbfda..33c209e9d 100755
--- a/test/integration/test-bug-601016-description-translation
+++ b/test/integration/test-bug-601016-description-translation
@@ -9,8 +9,9 @@ configarchitecture 'i386' 'amd64'
# we need a valid locale here, otherwise the language configuration
# will be overridden by LC_ALL=C
LOCALE="$(echo "$LANG" | cut -d'_' -f 1)"
+MD5Sum='Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
-PACKAGESTANZA="Package: apt
+PACKAGESTANZA='Package: apt
Priority: important
Section: admin
Installed-Size: 5984
@@ -19,8 +20,7 @@ Architecture: i386
Version: 0.8.7
Filename: pool/main/a/apt/apt_0.8.7_i386.deb
Size: 2140230
-MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08
-Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c"
+MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08'
PACKAGESTANZA2='Package: apt
Priority: important
@@ -31,22 +31,23 @@ Architecture: amd64
Version: 0.8.7
Filename: pool/main/a/apt/apt_0.8.7_amd64.deb
Size: 2210342
-MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a
-Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
+MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a'
echo "$PACKAGESTANZA
Description: Advanced front-end for dpkg
+$MD5Sum
$PACKAGESTANZA2
-Description: Advanced front-end for dpkg" > aptarchive/Packages
+Description: Advanced front-end for dpkg
+$MD5Sum" > aptarchive/Packages
echo "Package: apt
-Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
Description-${LOCALE}: Mächtige Oberfläche für dpkg
Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
- um Pakete zu installieren und Upgrades durchzuführen." | bzip2 > aptarchive/${LOCALE}.bz2
+ um Pakete zu installieren und Upgrades durchzuführen.
+$MD5Sum" | bzip2 > aptarchive/${LOCALE}.bz2
# the $LOCALE translation file will not be included as it is a flat archive it came from and therefore
# its name can not be guessed correctly… (in non-flat archives the files are called Translation-*)
@@ -54,10 +55,12 @@ echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate
NOLONGSTANZA="$PACKAGESTANZA
Description: Advanced front-end for dpkg
+$MD5Sum
"
ENGLISHSTANZA="$PACKAGESTANZA
Description: Advanced front-end for dpkg
+$MD5Sum
"
LOCALESTANZA="$PACKAGESTANZA
@@ -66,6 +69,7 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg
auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
um Pakete zu installieren und Upgrades durchzuführen.
+$MD5Sum
"
LOCALESTANZA2="$PACKAGESTANZA2
Description-${LOCALE}: Mächtige Oberfläche für dpkg
@@ -73,6 +77,7 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg
auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
um Pakete zu installieren und Upgrades durchzuführen.
+$MD5Sum
"
testrun() {
@@ -97,28 +102,32 @@ testrun
echo "$PACKAGESTANZA
Description: Advanced front-end for dpkg
+$MD5Sum
$PACKAGESTANZA2
-Description: Advanced front-end for dpkg" > aptarchive/Packages
+Description: Advanced front-end for dpkg
+$MD5Sum" > aptarchive/Packages
echo "Package: apt
-Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c
Description-en: Advanced front-end for dpkg
This is Debian's next generation front-end for the dpkg package manager.
It provides the apt-get utility and APT dselect method that provides a
- simpler, safer way to install and upgrade packages." | bzip2 > aptarchive/en.bz2
+ simpler, safer way to install and upgrade packages.
+$MD5Sum" | bzip2 > aptarchive/en.bz2
ENGLISHSTANZA="$PACKAGESTANZA
Description-en: Advanced front-end for dpkg
This is Debian's next generation front-end for the dpkg package manager.
It provides the apt-get utility and APT dselect method that provides a
simpler, safer way to install and upgrade packages.
+$MD5Sum
"
ENGLISHSTANZA2="$PACKAGESTANZA2
Description-en: Advanced front-end for dpkg
This is Debian's next generation front-end for the dpkg package manager.
It provides the apt-get utility and APT dselect method that provides a
simpler, safer way to install and upgrade packages.
+$MD5Sum
"
testrun
diff --git a/test/integration/test-cve-2013-1051-InRelease-parsing b/test/integration/test-cve-2013-1051-InRelease-parsing
index 853da5ff6..6764fefff 100755
--- a/test/integration/test-cve-2013-1051-InRelease-parsing
+++ b/test/integration/test-cve-2013-1051-InRelease-parsing
@@ -37,7 +37,7 @@ sed -i '/^-----BEGIN PGP SIGNATURE-----/,/^-----END PGP SIGNATURE-----/ s/^$/ /
# we append the (evil unsigned) Release file to the (good signed) InRelease
cat aptarchive/dists/stable/Release >> aptarchive/dists/stable/InRelease
-
+touch -d '+1hour' aptarchive/dists/stable/InRelease
# ensure the update fails
# useful for debugging to add "-o Debug::pkgAcquire::auth=true"
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 29301d07d..e45326970 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -35,7 +35,7 @@ SHA1-History:
SHA1-Patches:
7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28
$(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
-generatereleasefiles
+generatereleasefiles '+1hour'
signreleasefiles
find aptarchive -name 'Packages*' -type f -delete
aptget update -qq
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index fba7ab290..e56f458d3 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -184,5 +184,5 @@ runtest2
DELETEFILE="InRelease"
runtest
-#DELETEFILE="Release.gpg"
-#runtest
+DELETEFILE="Release.gpg"
+runtest
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index 05b875673..a8d191d0e 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -387,6 +387,41 @@ int main(int const argc, const char * argv[])
return 2;
}
+ FileFd pidfile;
+ if (_config->FindB("aptwebserver::fork", false) == true)
+ {
+ std::string const pidfilename = _config->Find("aptwebserver::pidfile", "aptwebserver.pid");
+ int const pidfilefd = GetLock(pidfilename);
+ if (pidfilefd < 0 || pidfile.OpenDescriptor(pidfilefd, FileFd::WriteOnly) == false)
+ {
+ _error->Errno("aptwebserver", "Couldn't acquire lock on pidfile '%s'", pidfilename.c_str());
+ _error->DumpErrors(std::cerr);
+ return 3;
+ }
+
+ pid_t child = fork();
+ if (child < 0)
+ {
+ _error->Errno("aptwebserver", "Forking failed");
+ _error->DumpErrors(std::cerr);
+ return 4;
+ }
+ else if (child != 0)
+ {
+ // successfully forked: ready to serve!
+ std::string pidcontent;
+ strprintf(pidcontent, "%d", child);
+ pidfile.Write(pidcontent.c_str(), pidcontent.size());
+ if (_error->PendingError() == true)
+ {
+ _error->DumpErrors(std::cerr);
+ return 5;
+ }
+ std::cout << "Successfully forked as " << child << std::endl;
+ return 0;
+ }
+ }
+
std::clog << "Serving ANY file on port: " << port << std::endl;
listen(sock, 1);
@@ -502,5 +537,7 @@ int main(int const argc, const char * argv[])
<< " on socket " << sock << std::endl;
close(client);
}
+ pidfile.Close();
+
return 0;
}