summaryrefslogtreecommitdiffstats
path: root/lib/libutil/imsg.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a cast to silence a compiler warning by clang on FreeBSD.tb2015-12-091-2/+2
| | | | | From Craig Rodrigues. ok tedu@
* Do not loop on EAGAIN in imsg_read(). Better to return the error to theclaudio2015-12-051-6/+4
| | | | | caller and let him do another poll loop. This fixes spinning relayd processes seen on busy TLS relays. OK benno@ henning@
* Remove three NULL-checks before free(). ok millert@mmcc2015-11-271-3/+2
|
* Handle malloc(0) returning NULL (which can happen on some othernicm2015-07-191-2/+4
| | | | | platforms) by explicitly making imsg->data = NULL when there is no data. ok deraadt
* Use memset instead of bzero for better portability.nicm2015-07-121-5/+5
| | | | ok gilles claudio doug
* bzero cmsgbuf before using it, silences valgrind warnings.brynet2015-07-031-1/+2
| | | | henning@ "sure"
* The correct semantic is to check msgbuf_write() for <= 0, not just < 0.reyk2015-06-111-2/+2
| | | | | | | | Fix one occurence in imsg_flush() and clarify it the man page. Discussed with at least blambert@ jsg@ yasuoka@. OK gilles@
* sys/types.h rather than sys/param.h, where applicable. avoid overreach.deraadt2014-06-301-2/+2
|
* constify data parameter in imsg_add() and imsg_compose()eric2013-12-261-3/+3
| | | | ok deraadt@
* fix memleak in imsg_read() when hitting the fd reserve checkgilles2013-02-011-1/+2
| | | | ok millert@, mikeb@, lteo@
* Fix a purely theoretical NULL-pointer dereference in the case that wereyk2012-12-191-2/+2
| | | | | | would be able to receive multiple SCM_RIGHTS messages. ok claudio@ gilles@
* in imsg_read() avoid calling recvmsg() if we detect that we will be shortgilles2012-06-021-13/+43
| | | | | | | | | | | | | on descriptors, this can be achieved thanks to the new getdtablecount() system call. application may provide a reserve count to ensure that the recvmsg() call is not called when they don't have enough descriptors to work properly. change the API so that transient errors that can be retried immediately are retried within the function right away, whereas transient errors for which the application may want to take action will set errno to EAGAIN. ok deraadt@ and henning@
* Move imsg into libutil and add a man page.nicm2010-05-261-0/+271
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt