xref: /third_party/libuv/docs/code/helloworld/main.c (revision e66f31c5)
1#include <stdio.h>
2#include <stdlib.h>
3#include <uv.h>
4
5int main() {
6    uv_loop_t *loop = malloc(sizeof(uv_loop_t));
7    uv_loop_init(loop);
8
9    printf("Now quitting.\n");
10    uv_run(loop, UV_RUN_DEFAULT);
11
12    uv_loop_close(loop);
13    free(loop);
14    return 0;
15}
16