projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e617fe7
)
Fix for adding \n for zero-length win32 read_pipe return
author
Bruce Momjian
<bruce@momjian.us>
Mon, 16 Aug 2004 02:46:36 +0000
(
02:46
+0000)
committer
Bruce Momjian
<bruce@momjian.us>
Mon, 16 Aug 2004 02:46:36 +0000
(
02:46
+0000)
src/port/exec.c
patch
|
blob
|
blame
|
history
diff --git
a/src/port/exec.c
b/src/port/exec.c
index 5a0badff204e65ce894660d14dfa2491ba8505cf..192e3228461c35e9e33c1e9835d5a8f5fad16f1e 100644
(file)
--- a/
src/port/exec.c
+++ b/
src/port/exec.c
@@
-7,7
+7,7
@@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/exec.c,v 1.2
2 2004/08/16 01:26:31
momjian Exp $
+ * $PostgreSQL: pgsql/src/port/exec.c,v 1.2
3 2004/08/16 02:46:36
momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@
-402,7
+402,7
@@
static char *pipe_read_line(char *cmd, char *line, int maxsize)
* We emulate fgets() behaviour. So if there is no newline
* at the end, we add one...
*/
- if (line[len-1] != '\n')
+ if (l
en == 0 || l
ine[len-1] != '\n')
strcat(line,"\n");
}