aboutsummaryrefslogtreecommitdiff
path: root/jim-aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-aio.c')
-rw-r--r--jim-aio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/jim-aio.c b/jim-aio.c
index 0e947db..abc7482 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -1368,12 +1368,12 @@ static int aio_cmd_eof(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
static int aio_cmd_close(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
+ AioFile *af = Jim_CmdPrivData(interp);
if (argc == 3) {
int option = -1;
#if defined(HAVE_SOCKETS)
static const char * const options[] = { "r", "w", "-nodelete", NULL };
enum { OPT_R, OPT_W, OPT_NODELETE };
- AioFile *af = Jim_CmdPrivData(interp);
if (Jim_GetEnum(interp, argv[2], options, &option, NULL, JIM_ERRMSG) != JIM_OK) {
return JIM_ERR;
@@ -1403,6 +1403,9 @@ static int aio_cmd_close(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
}
}
+ /* Explicit close ignores AIO_KEEPOPEN */
+ af->flags &= ~AIO_KEEPOPEN;
+
return Jim_DeleteCommand(interp, argv[0]);
}