summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-12-08 17:57:26 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-12-08 17:57:26 +0000
commit193593331d2833dbc640f3bb1ad3dd6bfaac858f (patch)
treea0c3ff26f2735a8a814b12b127e6a39d2064037c /methods
parent0f3579bce9bd81a91a6ec8f41051f13fa668cb7b (diff)
* more missing files added, this is really strange, I wonder if baz hates me :(
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc
index a5c9601e7..d308d72b0 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)