|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: imsg.c,v 1.17 2009/06/08 08:30:06 dlg Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: imsg.c,v 1.18 2009/08/08 18:33:40 nicm Exp $ */ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
@ -263,6 +263,9 @@ imsg_flush(struct imsgbuf *ibuf) |
|
|
void |
|
|
void |
|
|
imsg_clear(struct imsgbuf *ibuf) |
|
|
imsg_clear(struct imsgbuf *ibuf) |
|
|
{ |
|
|
{ |
|
|
while (ibuf->w.queued) |
|
|
|
|
|
msgbuf_clear(&ibuf->w); |
|
|
|
|
|
|
|
|
int fd; |
|
|
|
|
|
|
|
|
|
|
|
msgbuf_clear(&ibuf->w); |
|
|
|
|
|
while ((fd = imsg_get_fd(ibuf)) != -1) |
|
|
|
|
|
close(fd); |
|
|
} |
|
|
} |