mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-23 11:24:34 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c23100c3f0 | ||
|
|
ff2396b973 | ||
|
|
70ef23b9e3 | ||
|
|
568fe6a9e1 | ||
|
|
ae048605db | ||
|
|
2d9f1c9ce6 | ||
|
|
f9c72a01c8 | ||
|
|
270e270591 | ||
|
|
3c3b37c9aa | ||
|
|
0c92a564d8 | ||
|
|
53eadaa1c9 | ||
|
|
9591ac7efb |
No files matched your search
@@ -28,7 +28,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y install tree doxygen
|
sudo apt-get -y install tree doxygen
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make check || (cat test/test-suite.log; false)
|
make check || (cat test/test-suite.log; false)
|
||||||
- name: Upload Test Results
|
- name: Upload Test Results
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: libuev-test-${{ matrix.compiler }}
|
name: libuev-test-${{ matrix.compiler }}
|
||||||
path: test/*
|
path: test/*
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: debian:stable
|
container: debian:stable
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Installing dependencies
|
- name: Installing dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
coverity:
|
coverity:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Fetch latest Coverity Scan MD5
|
- name: Fetch latest Coverity Scan MD5
|
||||||
id: var
|
id: var
|
||||||
env:
|
env:
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
export MD5=$(cat coverity-latest.tar.gz.md5)
|
export MD5=$(cat coverity-latest.tar.gz.md5)
|
||||||
echo "Got MD5 $MD5"
|
echo "Got MD5 $MD5"
|
||||||
echo ::set-output name=md5::${MD5}
|
echo ::set-output name=md5::${MD5}
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v3
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: coverity-latest.tar.gz
|
path: coverity-latest.tar.gz
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
||||||
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
|
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
|
||||||
- name: Upload build.log
|
- name: Upload build.log
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: coverity-build.log
|
name: coverity-build.log
|
||||||
path: cov-int/build-log.txt
|
path: cov-int/build-log.txt
|
||||||
@@ -7,38 +7,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Create GitHub release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
release_id: ${{ steps.create_release.outputs.id }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Extract ChangeLog entry ...
|
|
||||||
# Hack to extract latest entry for body_path below
|
|
||||||
run: |
|
|
||||||
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
|
|
||||||
|head -n -1 > release.md
|
|
||||||
cat release.md
|
|
||||||
- name: Create release ...
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: libuEv ${{ github.ref }}
|
|
||||||
body_path: release.md
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
tarball:
|
|
||||||
name: Build and upload release tarball
|
name: Build and upload release tarball
|
||||||
needs: release
|
needs: release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Installing dependencies ...
|
- name: Installing dependencies ...
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
@@ -53,10 +27,13 @@ jobs:
|
|||||||
ls -lF ../
|
ls -lF ../
|
||||||
mkdir -p artifacts/
|
mkdir -p artifacts/
|
||||||
mv ../*.tar.* artifacts/
|
mv ../*.tar.* artifacts/
|
||||||
- name: Upload release artifacts ...
|
- name: Extract ChangeLog entry ...
|
||||||
uses: skx/github-action-publish-binaries@release-0.15
|
run: |
|
||||||
env:
|
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|head -n -1 > release.md
|
||||||
|
cat release.md
|
||||||
|
- uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
releaseId: ${{ needs.release.outputs.release_id }}
|
name: libuEv ${{ github.ref_name }}
|
||||||
args: artifacts/*
|
bodyFile: "release.md"
|
||||||
|
artifacts: "artifacts/*"
|
||||||
@@ -4,6 +4,13 @@ Change Log
|
|||||||
All notable changes to the project are documented in this file.
|
All notable changes to the project are documented in this file.
|
||||||
|
|
||||||
|
|
||||||
|
[v2.4.1][UNRELEASED]
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fix #27: possible buffer overrun in `uev_run()`, found by Steve Palmer
|
||||||
|
|
||||||
|
|
||||||
[v2.4.0][] - 2021-10-03
|
[v2.4.0][] - 2021-10-03
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@@ -444,6 +451,7 @@ Lua users mailing list.
|
|||||||
|
|
||||||
|
|
||||||
[UNRELEASED]: https://github.com/troglobit/libuev/compare/v2.4.0...HEAD
|
[UNRELEASED]: https://github.com/troglobit/libuev/compare/v2.4.0...HEAD
|
||||||
|
[v2.4.1]: https://github.com/troglobit/libuev/compare/v2.4.0...v2.4.1
|
||||||
[v2.4.0]: https://github.com/troglobit/libuev/compare/v2.3.2...v2.4.0
|
[v2.4.0]: https://github.com/troglobit/libuev/compare/v2.3.2...v2.4.0
|
||||||
[v2.3.2]: https://github.com/troglobit/libuev/compare/v2.3.1...v2.3.2
|
[v2.3.2]: https://github.com/troglobit/libuev/compare/v2.3.1...v2.3.2
|
||||||
[v2.3.1]: https://github.com/troglobit/libuev/compare/v2.3.0...v2.3.1
|
[v2.3.1]: https://github.com/troglobit/libuev/compare/v2.3.0...v2.3.1
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ of APIs. It is similar to the more established [libevent][], [libev][]
|
|||||||
and the venerable [Xt(3)][] event loop. The *µ* in the name refers to
|
and the venerable [Xt(3)][] event loop. The *µ* in the name refers to
|
||||||
both its limited feature set and the size impact of the library.
|
both its limited feature set and the size impact of the library.
|
||||||
|
|
||||||
|
Linux APIs supported and wrapped for ease-of-use:
|
||||||
|
|
||||||
|
- `epoll(2)`
|
||||||
|
- `eventfd(2)`
|
||||||
|
- `signalfd(2)`
|
||||||
|
- `timerfd(2)`
|
||||||
|
|
||||||
Failure mode changes introduced in v2.0 may affect users of v1.x, See
|
Failure mode changes introduced in v2.0 may affect users of v1.x, See
|
||||||
the [ChangeLog][] for the full details.
|
the [ChangeLog][] for the full details.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT(libuev, 2.4.0, https://github.com/troglobit/libuev/issues)
|
AC_INIT(libuev, 2.4.1-dev, https://github.com/troglobit/libuev/issues)
|
||||||
AC_CONFIG_AUX_DIR(aux)
|
AC_CONFIG_AUX_DIR(aux)
|
||||||
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
|
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|||||||
Vendored
+7
-6
@@ -2,7 +2,8 @@ Source: libuev
|
|||||||
Section: libs
|
Section: libs
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Joachim Wiberg <troglobit@gmail.com>
|
Maintainer: Joachim Wiberg <troglobit@gmail.com>
|
||||||
Build-Depends: debhelper (>= 10), libtool
|
Build-Depends: debhelper (>= 10)
|
||||||
|
Build-Depends-Indep: doxygen
|
||||||
Standards-Version: 4.3.0
|
Standards-Version: 4.3.0
|
||||||
Homepage: https://github.com/troglobit/libuev/
|
Homepage: https://github.com/troglobit/libuev/
|
||||||
Vcs-Browser: https://github.com/troglobit/libuev/
|
Vcs-Browser: https://github.com/troglobit/libuev/
|
||||||
@@ -12,7 +13,7 @@ Package: libuev-dev
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends}, libuev2 (= ${binary:Version})
|
Depends: ${misc:Depends}, libuev3 (= ${binary:Version})
|
||||||
Description: static library, header files, and docs for libuev
|
Description: static library, header files, and docs for libuev
|
||||||
Static library, header files, and documentation for libuEv
|
Static library, header files, and documentation for libuEv
|
||||||
.
|
.
|
||||||
@@ -24,10 +25,10 @@ Description: static library, header files, and docs for libuev
|
|||||||
Experienced developers may appreciate libuEv is built on top of modern
|
Experienced developers may appreciate libuEv is built on top of modern
|
||||||
Linux APIs like epoll, eventfd, timerf, and signalfd.
|
Linux APIs like epoll, eventfd, timerf, and signalfd.
|
||||||
|
|
||||||
Package: libuev2
|
Package: libuev3
|
||||||
Replaces: libuev
|
Replaces: libuev, libuev2
|
||||||
Conflicts: libuev
|
Conflicts: libuev, libuev2
|
||||||
Provides: libuev
|
Provides: libuev, libuev2
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Description: Lightweight event loop library for Linux
|
Description: Lightweight event loop library for Linux
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
libuev.so.2 libuev2 #MINVER#
|
libuev.so.3 libuev3 #MINVER#
|
||||||
* Build-Depends-Package: libite-dev
|
* Build-Depends-Package: libuev-dev
|
||||||
_uev_watcher_active@Base 2.3.0
|
_uev_watcher_active@Base 2.3.0
|
||||||
_uev_watcher_init@Base 2.3.0
|
_uev_watcher_init@Base 2.3.0
|
||||||
_uev_watcher_rearm@Base 2.3.0
|
_uev_watcher_rearm@Base 2.3.0
|
||||||
@@ -196,11 +196,11 @@ int uev_init(uev_ctx_t *ctx)
|
|||||||
/**
|
/**
|
||||||
* Create an event loop context
|
* Create an event loop context
|
||||||
* @param ctx Pointer to an uev_ctx_t context to be initialized
|
* @param ctx Pointer to an uev_ctx_t context to be initialized
|
||||||
* @param maxevents Maximum number of events in event cache
|
* @param maxevents Maximum number of events in event cache [1, 10]
|
||||||
*
|
*
|
||||||
* This function is the same as uev_init() except for the @p maxevents
|
* This function is the same as uev_init() except for the @p maxevents
|
||||||
* argument, which controls the number of events in the event cache
|
* argument, max ::UEV_MAX_EVENTS, which controls the number of events
|
||||||
* returned to the main loop.
|
* in the event cache returned to the main loop.
|
||||||
*
|
*
|
||||||
* In cases where you have multiple events pending in the cache and some
|
* In cases where you have multiple events pending in the cache and some
|
||||||
* event may cause later ones, already sent by the kernel to userspace,
|
* event may cause later ones, already sent by the kernel to userspace,
|
||||||
@@ -222,6 +222,9 @@ int uev_init1(uev_ctx_t *ctx, int maxevents)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (maxevents > UEV_MAX_EVENTS)
|
||||||
|
maxevents = UEV_MAX_EVENTS;
|
||||||
|
|
||||||
memset(ctx, 0, sizeof(*ctx));
|
memset(ctx, 0, sizeof(*ctx));
|
||||||
ctx->maxevents = maxevents;
|
ctx->maxevents = maxevents;
|
||||||
|
|
||||||
@@ -295,8 +298,8 @@ int uev_exit(uev_ctx_t *ctx)
|
|||||||
*/
|
*/
|
||||||
int uev_run(uev_ctx_t *ctx, int flags)
|
int uev_run(uev_ctx_t *ctx, int flags)
|
||||||
{
|
{
|
||||||
uev_t *w;
|
|
||||||
int timeout = -1;
|
int timeout = -1;
|
||||||
|
uev_t *w;
|
||||||
|
|
||||||
if (!ctx || ctx->fd < 0) {
|
if (!ctx || ctx->fd < 0) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
@@ -319,8 +322,12 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
|||||||
|
|
||||||
while (ctx->running && ctx->watchers) {
|
while (ctx->running && ctx->watchers) {
|
||||||
struct epoll_event ee[UEV_MAX_EVENTS];
|
struct epoll_event ee[UEV_MAX_EVENTS];
|
||||||
|
int maxevents = ctx->maxevents;
|
||||||
int i, nfds, rerun = 0;
|
int i, nfds, rerun = 0;
|
||||||
|
|
||||||
|
if (maxevents > UEV_MAX_EVENTS)
|
||||||
|
maxevents = UEV_MAX_EVENTS;
|
||||||
|
|
||||||
/* Handle special case: `application < file.txt` */
|
/* Handle special case: `application < file.txt` */
|
||||||
if (ctx->workaround) {
|
if (ctx->workaround) {
|
||||||
_UEV_FOREACH(w, ctx->watchers) {
|
_UEV_FOREACH(w, ctx->watchers) {
|
||||||
@@ -341,7 +348,7 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
|||||||
continue;
|
continue;
|
||||||
ctx->workaround = 0;
|
ctx->workaround = 0;
|
||||||
|
|
||||||
while ((nfds = epoll_wait(ctx->fd, ee, ctx->maxevents, timeout)) < 0) {
|
while ((nfds = epoll_wait(ctx->fd, ee, maxevents, timeout)) < 0) {
|
||||||
if (!ctx->running)
|
if (!ctx->running)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -356,9 +363,9 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
|||||||
|
|
||||||
for (i = 0; ctx->running && i < nfds; i++) {
|
for (i = 0; ctx->running && i < nfds; i++) {
|
||||||
struct signalfd_siginfo fdsi;
|
struct signalfd_siginfo fdsi;
|
||||||
|
ssize_t sz = sizeof(fdsi);
|
||||||
uint32_t events;
|
uint32_t events;
|
||||||
uint64_t exp;
|
uint64_t exp;
|
||||||
ssize_t sz = sizeof(fdsi);
|
|
||||||
|
|
||||||
w = (uev_t *)ee[i].data.ptr;
|
w = (uev_t *)ee[i].data.ptr;
|
||||||
events = ee[i].events;
|
events = ee[i].events;
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ static void sig_cb(uev_t *w, void *cbarg, int events)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SIGCHLD:
|
case SIGCHLD:
|
||||||
if (arg->pid != w->siginfo.ssi_pid)
|
if (arg->pid != (pid_t)w->siginfo.ssi_pid)
|
||||||
err(1, "wrong child exited pid %d vs ssi_pid %d",
|
err(1, "wrong child exited pid %d vs ssi_pid %d",
|
||||||
arg->pid, w->siginfo.ssi_pid);
|
arg->pid, w->siginfo.ssi_pid);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user