~torresjrjr/dc

8ceb910df45458ad9590c403d85cbcbd9312f664 — Byron Torres a month ago f437c51 master
handle io::close errors
1 files changed, 3 insertions(+), 3 deletions(-)

M dc.ha
M dc.ha => dc.ha +3 -3
@@ 39,7 39,7 @@ export fn main() void = {
		case let err: fs::error =>
			fmt::fatal("dc: {} '{}'", fs::strerror(err), filename);
		};
		defer io::close(file);
		defer io::close(file)!;

		const in = bufio::buffered(file, buf, []);
		match (dc(&in)) {


@@ 117,10 117,10 @@ fn dc(in: *bufio::bufstream) (void | io::error) = {
			os::exec::addfile(&cmd, pipe.1, os::stdout_file);

			const proc = os::exec::start(&cmd)!; //TODO
			io::close(pipe.1);
			io::close(pipe.1)!;

			let data = io::drain(pipe.0);
			io::close(pipe.0);
			io::close(pipe.0)!;

			const status = os::exec::wait(&proc);
		// printing