summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/logmsg.c
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-11 02:43:25 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-11 02:43:25 +0000
commit1b1381013d1b4441f30c0932fec31bbcdb04a43e (patch)
treee6bc5c2af975b7bcc891a7172e876694c30d2f92 /usr.bin/cvs/logmsg.c
parentf4a2e3c6889aa930bfc14aa068754ebcf1f53572 (diff)
cvs_logmsg_edit no longer fails with ECHILD.
Add comment describing cvs_logmsg_edit usage.
Diffstat (limited to 'usr.bin/cvs/logmsg.c')
-rw-r--r--usr.bin/cvs/logmsg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c
index 15c51fde6c7..20c4c91b28e 100644
--- a/usr.bin/cvs/logmsg.c
+++ b/usr.bin/cvs/logmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logmsg.c,v 1.40 2007/05/11 02:37:31 ray Exp $ */
+/* $OpenBSD: logmsg.c,v 1.41 2007/05/11 02:43:24 ray Exp $ */
/*
* Copyright (c) 2007 Joris Vink <joris@openbsd.org>
*
@@ -152,7 +152,7 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed,
logmsg = NULL;
for (;;) {
- if (cvs_logmsg_edit(fpath) == -1 && errno != ECHILD)
+ if (cvs_logmsg_edit(fpath) == -1)
break;
if (fstat(fd, &st2) == -1) {
@@ -192,6 +192,12 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed,
return (logmsg);
}
+/*
+ * Execute an editor on the specified pathname, which is interpreted
+ * from the shell. This means flags may be included.
+ *
+ * Returns -1 on error, or the exit value on success.
+ */
int
cvs_logmsg_edit(const char *pathname)
{