src/dbfs/interrupt.c
branchnew-evsql
changeset 44 9e76ee9729b6
parent 42 40a3b13ffc9d
child 48 8b019d191353
equal deleted inserted replaced
43:5776ace903b5 44:9e76ee9729b6
    16     struct timeval tv;
    16     struct timeval tv;
    17     err_t err;
    17     err_t err;
    18 
    18 
    19     // abort query
    19     // abort query
    20     evsql_query_abort(NULL, query);
    20     evsql_query_abort(NULL, query);
       
    21 
       
    22     // error the req
       
    23     if ((err = -fuse_reply_err(req, EINTR)))
       
    24         EWARNING(err, "fuse_reply_err");
    21     
    25     
    22     /*
    26     /*
    23      * Due to a locking bug in libfuse (at least 2.7.4), we can't call fuse_reply_err from the interrupt function, so we must
    27      * Due to a locking bug in libfuse (at least 2.7.4), we can't call fuse_reply_err from the interrupt function, so we must
    24      * schedule after this function returns.
    28      * schedule after this function returns.
    25      */
    29      * /
    26     tv.tv_sec = 0;
    30     tv.tv_sec = 0;
    27     tv.tv_usec = 0;
    31     tv.tv_usec = 0;
    28     if (event_base_once(ctx->ev_base, -1, EV_TIMEOUT, _dbfs_interrupt_reply, req, &tv))
    32     if (event_base_once(ctx->ev_base, -1, EV_TIMEOUT, _dbfs_interrupt_reply, req, &tv))
    29         PWARNING("event_base_once failed, dropping req reply: %p", req);
    33         PWARNING("event_base_once failed, dropping req reply: %p", req);
       
    34         */
    30 }
    35 }
    31 
    36 
    32 void _dbfs_interrupt_ctx (struct fuse_req *req, void *ctx_ptr) {
    37 void _dbfs_interrupt_ctx (struct fuse_req *req, void *ctx_ptr) {
    33     // dereference ctx
    38     // dereference ctx
    34     struct dbfs_interrupt_ctx *ctx = ctx_ptr;
    39     struct dbfs_interrupt_ctx *ctx = ctx_ptr;