diff options
author | Michael Vogt <mvo@debian.org> | 2005-11-28 22:35:09 +0000 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2005-11-28 22:35:09 +0000 |
commit | c99a4ffaa6bc01308f52080816be9c0d879dc028 (patch) | |
tree | 449a9d224f5e6fa1dfa4716880429c12e2e169cc /methods/http.cc | |
parent | 565cc6c0ecd9ea85d3455592321f31bf1a7d17a8 (diff) | |
parent | b57c8bb4085634c3fbe219ae1fd005d6bd62987a (diff) |
* apt--mvo merged
Patches applied:
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-104
* build-depend on libdb4.3 now, fix for kFreeBSD (#317718)
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc index a5c9601e7..dc3f0b763 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -824,7 +824,10 @@ bool HttpMethod::Flush(ServerState *Srv) { if (File != 0) { - SetNonBlock(File->Fd(),false); + // on GNU/kFreeBSD, apt dies on /dev/null because non-blocking + // can't be set + if (File->Name() != "/dev/null") + SetNonBlock(File->Fd(),false); if (Srv->In.WriteSpace() == false) return true; @@ -852,7 +855,10 @@ bool HttpMethod::ServerDie(ServerState *Srv) // Dump the buffer to the file if (Srv->State == ServerState::Data) { - SetNonBlock(File->Fd(),false); + // on GNU/kFreeBSD, apt dies on /dev/null because non-blocking + // can't be set + if (File->Name() != "/dev/null") + SetNonBlock(File->Fd(),false); while (Srv->In.WriteSpace() == true) { if (Srv->In.Write(File->Fd()) == false) |