pg_checksums: Handle read and write returns correctly
authorPeter Eisentraut <[email protected]>
Tue, 3 Sep 2019 06:26:55 +0000 (08:26 +0200)
committerPeter Eisentraut <[email protected]>
Tue, 3 Sep 2019 06:30:21 +0000 (08:30 +0200)
commit1d7a6e3eb45946db86d6d1776c55323740d955b0
treea848299837c78551942a0052d0285d7e9897a0b6
parent396e4afdbcbfd3398415f1a0a29668d6a24a2ddd
pg_checksums: Handle read and write returns correctly

The read() return was not checking for errors, the write() return was
not checking for short writes.

Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/5de61b6b-8be9-7771-0048-860328efe027%402ndquadrant.com
src/bin/pg_checksums/pg_checksums.c