This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Help: looking for equivalent syscall to shutdown() but for unix pipes
- From: Alexandre Bique <bique dot alexandre at gmail dot com>
- To: Dmitry Goncharov <dgoncharov at users dot sf dot net>
- Cc: Godmar Back <godmar at gmail dot com>, Florian Weimer <fweimer at redhat dot com>, libc-help at sourceware dot org
- Date: Fri, 18 Jan 2019 20:25:49 +0100
- Subject: Re: Help: looking for equivalent syscall to shutdown() but for unix pipes
- References: <CAP737oKftbrxDDRX7RM_PBVTcx54d+j=Vz5LJysq=3D0CNeRvw@mail.gmail.com> <87r2dbu0t8.fsf@oldenburg2.str.redhat.com> <CAP737o+A0OoRM1D1QR6=cg1i+wu37q2NU9bxOskEtdSfbqD=3w@mail.gmail.com> <871s5aqnqn.fsf@oldenburg2.str.redhat.com> <CAB4+JYKF3WufezPDPcWJCT5a0tDBt-kVCT4e+BmauespykFDmw@mail.gmail.com> <CAP737oKkCjU9yY4KxWYv5uQGS1HdnhBaFtw=1zBYS-gAVeFa2w@mail.gmail.com> <CAG+Z0Cte0LJj4VdCAyEPFpCJ=5gCnUHyOQNSG5z00_6wmKzh+w@mail.gmail.com>
On Fri, Jan 18, 2019 at 8:22 PM Dmitry Goncharov
<dgoncharov@users.sf.net> wrote:
>
> On Thu, Jan 17, 2019 at 4:13 AM Alexandre Bique
> <bique.alexandre@gmail.com> wrote:
> > I'm not very enthusiast with the idea of sending an EOF message,
> > because the original producer comes from an other process, so there
> > could be all sorts of corrupted data over the pipe
>
> How is the pipe useful at all if there could be all sorts of corrupted data?
> Why don't you have stopConsumer close the write end of the pipe rather
> than the read end?
This doesn't even apply, let's consider that we don't have the file
descriptor to the write end of the pipe, we can't close it and we
can't write to it.
Let's assume that the write end of the pipe is owned by a process that
we can't modify and we know nothing about it.
--
Alexandre Bique