예제 #1
0
static void cancel_source(void *_source) {
    dispatch_source_t source = (dispatch_source_t)_source;
    int descriptor = dispatch_source_get_handle(source);
    asl_redirect_t *aslr = &redirect_descriptors[descriptor];

    /* Flush the buffer */
    _read_redirect(descriptor, 1);

    close(descriptor);

    asl_client_release(aslr->asl);
    asl_msg_release(aslr->msg);
    free(aslr->buf);

    memset(aslr, 0, sizeof(*aslr));
    dispatch_release(source);
    dispatch_group_leave(read_source_group);
}
예제 #2
0
파일: asl.c 프로젝트: 010001111/darling
void
asl_close(aslclient ac)
{
	asl_client_release((asl_client_t *)ac);
}