From: Steven J Long <slong@rathaus.eclipse.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: The SIMPLEST web server to config (this time - just for serving video files) ?
Date: Tue, 15 Nov 2011 19:57:50 +0000 [thread overview]
Message-ID: <j9ufst$7jt$1@dough.gmane.org> (raw)
In-Reply-To: 201111132258.06753.michaelkintzios@gmail.com
Mick wrote:
>> File "/usr/lib64/python2.7/SocketServer.py", line 694, in finish
>> self.wfile.flush()
>> File "/usr/lib64/python2.7/socket.py", line 303, in flush
>> self._sock.sendall(view[write_offset:write_offset+buffer_size])
>> error: [Errno 32] Broken pipe
>> ----------------------------------------
>>
> I'm pretty much clueless in python so can't interpret the messages -
> hopefully someone more knowledgeable will chime in.
>
'Broken pipe' just means the remote closed the connection. It's a pretty
standard error in this context, which the server should handle.
A process normally gets a SIGPIPE which will by default terminate it, which
is what you want if you have a pipeline'd command whose output is no longer
required. An example would be checking there is at least one matching file
somewhere in a directory hierarchy with:
read -d '' f < <(find /base/dir -type f -name 'foo*' -print0)
[[ $f ]] || echo 'no foo* files'
-- find will terminate after the first filename has been read.
In this case, signal(SIGPIPE, SIG_IGN) or the equivalent has been called,
which gives EPIPE instead; a process ignoring the signal is supposed to deal
with the error. So I'd say it's a bug.
--
#friendly-coders -- We're friendly, but we're not /that/ friendly ;-)
next prev parent reply other threads:[~2011-11-15 19:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 18:21 [gentoo-user] The SIMPLEST web server to config (this time - just for serving video files) ? Mark Knecht
2011-11-13 19:16 ` Pandu Poluan
2011-11-13 19:45 ` Mark Knecht
2011-11-13 22:57 ` Mick
2011-11-14 0:20 ` Pandu Poluan
2011-11-15 19:57 ` Steven J Long [this message]
2011-11-14 4:37 ` Stroller
2011-11-13 19:22 ` Mick
2011-11-13 20:08 ` Mark Knecht
2011-11-13 19:28 ` Chris Brennan
2011-11-14 14:57 ` [gentoo-user] " Grant Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j9ufst$7jt$1@dough.gmane.org' \
--to=slong@rathaus.eclipse.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox