|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 7/8] xl: use xenconsole startup protocol
Wei Liu writes ("[RFC PATCH 7/8] xl: use xenconsole startup protocol"):
> If user asks xl to automatically connect to console when creating a
> guest, use the new startup protocol before trying to unpause domain so
> that we don't lose any console output.
Most of the logic here LGTM.
> @@ -2997,7 +2999,15 @@ start:
>
> libxl_asyncprogress_how autoconnect_console_how_buf;
> if ( dom_info->console_autoconnect ) {
> + if (pipe(notify_pipe)) {
Use libxl_pipe.
> + if (autoconnect_console_how) {
> + char buf[1];
> + if (read(notify_pipe[0], buf, 1) != 1 && buf[0] != 0x00) {
> + fprintf(stderr,
> + "Failed to get notification from xenconsole, errno %d\n",
> + errno);
As you say in your 0/, poor error handling. You need to print
the value of buf, if relevant, and handle EOF properly.
> + }
> + close(notify_pipe[0]);
> + close(notify_pipe[1]);
> + notify_pipe[0] = notify_pipe[1] = -1;
> + }
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |