mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-24 11:34:32 +00:00
uev_run(): Return unique error codes in case of actual error.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d1f5062e79
commit
f78348a92a
1 file changed
+3
-2
@@ -325,7 +325,7 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
||||
|
||||
/* Unrecoverable error, cleanup and exit with error. */
|
||||
uev_exit(ctx);
|
||||
return -1;
|
||||
return -2;
|
||||
}
|
||||
|
||||
for (i = 0; ctx->running && i < nfds; i++) {
|
||||
@@ -343,8 +343,9 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
||||
|
||||
/* Must recreate epoll fd now ... */
|
||||
if (_init(ctx, 1)) {
|
||||
/* Catastrophic error, no way to recover. */
|
||||
uev_exit(ctx);
|
||||
return -2;
|
||||
return -3;
|
||||
}
|
||||
|
||||
/* Restart watchers in new efd */
|
||||
|
||||
Reference in new issue
Block a user