1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-10 13:57:22 +03:00

B #3052: Makes vnc child process to exit without segfault

(cherry picked from commit 18d5618ac38c980e3cfc673b2e5b6ad91c6d904a)
This commit is contained in:
Ruben S. Montero 2019-03-18 11:53:23 +01:00
parent 4161cb9f05
commit ea6edab699

View File

@ -71,8 +71,7 @@
}
/* these colours are from linux kernel drivers/char/vt.c */
unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7,
8,12,10,14, 9,13,11,15 };
unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7, 8,12,10,14, 9,13,11,15 };
/* the default colour table, for VGA+ colour systems */
int default_red[] = {0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,
@ -107,8 +106,8 @@ ucs2_to_utf8 (unicode c, char *out)
}
static void
rfb_draw_char (rfbScreenInfoPtr rfbScreen, int x, int y,
unsigned short c, rfbPixel col)
rfb_draw_char (rfbScreenInfoPtr rfbScreen, int x, int y, unsigned short c,
rfbPixel col)
{
if (c > vt_font_size) {
rfbLog ("undefined font glyph %d\n", c);
@ -2242,6 +2241,11 @@ int vncterm_cmd(int sd, int timeout, int width, int heigth,
}
}
if ( c < 0 )
{
break;
}
vncterm_puts(vt, buffer, c);
}
@ -2332,7 +2336,6 @@ int vncterm_server(int ctrl_pipe, int timeout, int width, int height)
void sigchld_handler(int signo)
{
waitpid(-1, NULL, 0);
};