as shown in patch imsg_compose receives -1 as type and peerid
argument to imsg_compose, according to imsg_compose definition:
int
imsg_compose(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
pid_t pid, int fd, const void *data, uint16_t datalen);
So 4294967295 is used as special value when maybe 0 should be used?
regress ok on amd64, patch inline and attached in case of mangling
Index: file.c
===================================================================
RCS file: /cvs/src/usr.bin/file/file.c,v
retrieving revision 1.66
diff -u -p -r1.66 file.c
--- file.c 15 Jan 2018 19:45:51 -0000 1.66
+++ file.c 14 Feb 2018 16:02:46 -0000
@@ -280,7 +280,7 @@ prepare_message(struct input_msg *msg, i
static void
send_message(struct imsgbuf *ibuf, void *msg, size_t msglen, int fd)
{
- if (imsg_compose(ibuf, -1, -1, 0, fd, msg, msglen) != 1)
+ if (imsg_compose(ibuf, 0, 0, 0, fd, msg, msglen) != 1)
err(1, "imsg_compose");
if (imsg_flush(ibuf) != 0)
err(1, "imsg_flush");
Index: file.c
===================================================================
RCS file: /cvs/src/usr.bin/file/file.c,v
retrieving revision 1.66
diff -u -p -r1.66 file.c
--- file.c 15 Jan 2018 19:45:51 -0000 1.66
+++ file.c 14 Feb 2018 16:02:46 -0000
@@ -280,7 +280,7 @@ prepare_message(struct input_msg *msg, i
static void
send_message(struct imsgbuf *ibuf, void *msg, size_t msglen, int fd)
{
- if (imsg_compose(ibuf, -1, -1, 0, fd, msg, msglen) != 1)
+ if (imsg_compose(ibuf, 0, 0, 0, fd, msg, msglen) != 1)
err(1, "imsg_compose");
if (imsg_flush(ibuf) != 0)
err(1, "imsg_flush");