made all fdstreams RAII for fd
This commit is contained in:
@ -66,7 +66,6 @@ void test3() {
|
||||
throw_if_min1(fd = ::open("passwd", mode, perm));
|
||||
sc::io::fdostream os {fd};
|
||||
os << passwd;
|
||||
throw_if_min1(::close(fd));
|
||||
}
|
||||
|
||||
void test4() {
|
||||
@ -77,7 +76,6 @@ void test4() {
|
||||
while (getline(is, line)) {
|
||||
cout << line << '\n';
|
||||
}
|
||||
throw_if_min1(::close(fd));
|
||||
}
|
||||
|
||||
void test5() {
|
||||
@ -92,7 +90,6 @@ void test5() {
|
||||
if (getline(file, line)) {
|
||||
cout << line << '\n';
|
||||
}
|
||||
throw_if_min1(::close(fd));
|
||||
}
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
|
Reference in New Issue
Block a user