+Mon Jun 9 15:42:34 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>
+
+ * src/lxc_driver.c: Console element is output only. Always open new
+ PTY when starting a container.
+ Fix string overrun when storing console name in VM def struct
+
Mon Jun 9 13:14:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
Better error messages in xend driver.
Wed Jun 4 23:02:21 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>
- * src/lxc_driver.c: Add sanity of tty pid before kill()
+ * src/lxc_driver.c: Add sanity check of tty pid before kill()
Ignore ECHILD errors during VM cleanup
Call functions to store tty pid and cleanup tty pid file
* src/lxc_conf.h: Add function to verify container process exists
#include "lxc_driver.h"
#include "driver.h"
#include "internal.h"
+#include "memory.h"
#include "util.h"
#include "memory.h"
char *ptsStr;
if (0 < strlen(vmDef->tty)) {
- *ttyDev = open(vmDef->tty, O_RDWR|O_NOCTTY|O_NONBLOCK);
+ *ttyDev = posix_openpt(O_RDWR|O_NOCTTY|O_NONBLOCK);
if (*ttyDev < 0) {
lxcError(conn, NULL, VIR_ERR_INTERNAL_ERROR,
"open() tty failed: %s", strerror(errno));
goto setup_complete;
}
/* This value needs to be stored in the container configuration file */
- if (STRNEQ(ptsStr, vmDef->tty)) {
- strcpy(vmDef->tty, ptsStr);
+ VIR_FREE(vmDef->tty);
+ if (!(vmDef->tty = strdup(ptsStr))) {
+ lxcError(conn, NULL, VIR_ERR_NO_MEMORY,
+ _("unable to get storage for vm tty name"));
+ goto setup_complete;
}
/* Enter raw mode, so all characters are passed directly to child */