[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Why xs_handle is not part of header rather xs.c file
On Mon, Sep 2, 2013 at 1:29 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote: On Fri, 2013-08-30 at 09:58 -0700, Shakil k wrote: Ian. Â Â ÂThis doesn't work, as per the below code. I can never see the data coming to select if I do xenstore-watch on the node from other terminal on the same dom0.
Do we need to do xs_watch before calling select? and why so? struct xs_handle *xen_handle; xs_transaction_t xen_transact;Â int xen_fd;Â int xenstore_initialized = 0;
int xenstore_watch(const char *path, struct timeval *Timeout) { int status = 0; fd_set set;
fd_set set1; int error; char **vec; unsigned int num_strings;
static int watch_counter=0; static int counter=0; //INIT
xen_handle = xs_daemon_open(); xen_fd = xs_fileno(xen_handle); FD_ZERO(&set);
FD_SET(xen_fd, &set); FD_ZERO(&set1); FD_SET(xen_fd, &set1);
if ( select(xen_fd + 1, &set, &set1, NULL, Timeout) != -1) { printf("Data is availabale after select\n");
} return 0; }Â _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |