monitor.c revision 72d0e1cb2facaa4b8ba2f15e311d6bb9491badb7
/*
* lxc: linux Container library
*
* (C) Copyright IBM Corp. 2007, 2008
*
* Authors:
* Daniel Lezcano <dlezcano at fr.ibm.com>
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include "error.h"
#include "af_unix.h"
#ifndef UNIX_PATH_MAX
#define UNIX_PATH_MAX 108
#endif
{
int fd;
if (fd < 0)
return;
}
{
}
int lxc_monitor_open(void)
{
int fd;
if (fd < 0) {
return -1;
}
return -1;
}
return fd;
}
/* timeout of 0 means return immediately; -1 means wait forever */
{
struct sockaddr_un from;
int ret;
if (timeout != -1) {
if (ret == -1)
return -1;
else if (!ret)
return -2; // timed out
}
if (ret < 0) {
SYSERROR("failed to receive state");
return -1;
}
return ret;
}
{
}
int lxc_monitor_close(int fd)
{
}