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