summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/logmsg.c
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2007-05-11 02:43:24 +0000
committerray <ray@openbsd.org>2007-05-11 02:43:24 +0000
commit717c55ebf2b723277f3b6f1a15246553b889178f (patch)
treed880f9152a03af4e1c7f4ceaf5745c8d0cdb5ab2 /usr.bin/cvs/logmsg.c
parentSync with editit from sendbug. (diff)
downloadwireguard-openbsd-717c55ebf2b723277f3b6f1a15246553b889178f.tar.xz
wireguard-openbsd-717c55ebf2b723277f3b6f1a15246553b889178f.zip
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)
{