mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Fix Pipe copy/assignment to make a copy of flags.
This commit is contained in:
parent
77955d7677
commit
0921465297
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,8 @@ Pipe::Pipe(const Pipe& other)
|
||||||
{
|
{
|
||||||
fds[0] = dup_or_fail(other.fds[0], other.flags[0]);
|
fds[0] = dup_or_fail(other.fds[0], other.flags[0]);
|
||||||
fds[1] = dup_or_fail(other.fds[1], other.flags[1]);
|
fds[1] = dup_or_fail(other.fds[1], other.flags[1]);
|
||||||
|
flags[0] = other.flags[0];
|
||||||
|
flags[1] = other.flags[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Pipe& Pipe::operator=(const Pipe& other)
|
Pipe& Pipe::operator=(const Pipe& other)
|
||||||
|
@ -75,5 +77,7 @@ Pipe& Pipe::operator=(const Pipe& other)
|
||||||
close(fds[1]);
|
close(fds[1]);
|
||||||
fds[0] = dup_or_fail(other.fds[0], other.flags[0]);
|
fds[0] = dup_or_fail(other.fds[0], other.flags[0]);
|
||||||
fds[1] = dup_or_fail(other.fds[1], other.flags[1]);
|
fds[1] = dup_or_fail(other.fds[1], other.flags[1]);
|
||||||
|
flags[0] = other.flags[0];
|
||||||
|
flags[1] = other.flags[1];
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue