| 12345678910111213141516171819202122 |
- /* host-curl: the browser's __serve helper, built for Linux. */
- #include <signal.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "host.h"
- extern void curl_start(const char *arg);
- int main(int argc, char **argv)
- {
- const char *root = getenv("NEBOS_HOST_ROOT");
- memset(&host_opts, 0, sizeof(host_opts));
- host_opts.headless = 1;
- if (host_runtime_init(argv[0], root) != 0)
- return 1;
- signal(SIGPIPE, SIG_IGN);
- curl_start(argc > 1 && argv[1] ? argv[1] : "");
- return 0;
- }
|