postgresql/src/bin/pg_ctl
Heikki Linnakangas 2a49585e2b Further tweaking of the readfile() function in pg_ctl.
Don't leak a file descriptor if the file is empty or we can't read its size.

Expect there to be a newline at the end of the last line, too. If there
isn't, ignore anything after the last newline. This makes it a tiny bit
more robust in case the file is appended to concurrently, so that we don't
return the last line if it hasn't been fully written yet. And this makes
the code a bit less obscure, anyway. Per Tom Lane's suggestion.

Backpatch to all supported branches.
2012-10-18 22:26:26 +03:00
..
po Translation updates 2011-08-17 14:07:46 +03:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nls.mk Make _ be automatically included in GETTEXT_TRIGGERS 2011-06-26 23:05:30 +03:00
pg_ctl.c Further tweaking of the readfile() function in pg_ctl. 2012-10-18 22:26:26 +03:00