Searched refs:timeout (Results 1 - 21 of 21) sorted by relevance

/lxc/src/lxc/tools/
H A Dlxc_stop.c51 if (lxc_safe_long(arg, &args->timeout) < 0)
70 {"timeout", required_argument, 0, 't'},
88 -t, --timeout=T wait T seconds before hard-stopping\n\
91 --nokill Only request clean shutdown, don't force kill after timeout\n\
96 .timeout = -2,
105 int timeout = a->timeout; local
114 if (timeout == 0)
127 if (timeout != -1) {
135 if (timeout !
[all...]
H A Dlxc_wait.c52 case 't': args->timeout = atol(optarg); break;
59 {"timeout", required_argument, 0, 't'},
75 -t, --timeout=TMO Seconds to wait for state changes\n\
80 .timeout = -1,
123 if (!c->wait(c, my_args.states, my_args.timeout)) {
H A Dlxc_autostart.c61 if (lxc_safe_long(arg, &args->timeout) < 0)
76 {"timeout", required_argument, 0, 't'},
96 -t, --timeout=T wait T seconds before hard-stopping\n",
100 .timeout = 60,
454 if (!c->shutdown(c, my_args.timeout)) {
H A Dlxc-start-ephemeral.in324 if not dest.start() or not dest.wait("RUNNING", timeout=5):
334 if not dest.shutdown(timeout=5):
339 ips = dest.get_ips(timeout=10)
415 if not dest.shutdown(timeout=5):
/lxc/config/init/upstart/
H A Dlxc-instance.conf7 kill timeout 120
/lxc/src/lxc/
H A Dstate.h36 extern int lxc_wait(const char *lxcname, const char *states, int timeout, const char *lxcpath);
H A Dstate.c108 extern int lxc_wait(const char *lxcname, const char *states, int timeout, argument
144 if (timeout != -1) {
150 if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) {
156 if (timeout != -1) {
161 if (timeout - elapsed_time <= 0)
163 timeout -= elapsed_time;
H A Dmonitor.h71 * Blocking read for the next container state change with timeout
74 * @timeout : the timeout in seconds to wait for a state change
78 extern int lxc_monitor_read_timeout(int fd, struct lxc_msg *msg, int timeout);
82 * change with timeout
86 * @timeout : the timeout in seconds to wait for a state change
91 int timeout);
H A Dlxclock.h86 * \param timeout Seconds to wait to take lock (\c 0 signifies an
89 * \return \c 0 if lock obtained, \c -2 on failure to set timeout,
92 * \note \p timeout is (currently?) only supported for privlock, not
93 * for slock. Since currently there is not a single use of the timeout
97 extern int lxclock(struct lxc_lock *lock, int timeout);
H A Dlxcutmp.c434 struct itimerspec timeout; local
445 /* set a one second timeout. Repeated. */
446 timeout.it_value.tv_sec = 1;
447 timeout.it_value.tv_nsec = 0;
449 timeout.it_interval.tv_sec = 1;
450 timeout.it_interval.tv_nsec = 0;
452 result = timerfd_settime(fd, 0, &timeout, NULL);
H A Dlxclock.c192 int lxclock(struct lxc_lock *l, int timeout) argument
199 if (!timeout) {
209 ts.tv_sec += timeout;
217 if (timeout) {
218 ERROR("Error: timeout not supported with flock");
H A Dmonitor.c256 int timeout)
261 ret = poll(fds, nfds, timeout * 1000);
287 int lxc_monitor_read_timeout(int fd, struct lxc_msg *msg, int timeout) argument
295 return lxc_monitor_read_fdset(&fds, 1, msg, timeout);
255 lxc_monitor_read_fdset(struct pollfd *fds, nfds_t nfds, struct lxc_msg *msg, int timeout) argument
H A Darguments.h69 long timeout; member in struct:lxc_arguments
H A Dlxccontainer.h262 * \param timeout Timeout in seconds.
264 * \return \c true if state reached within \p timeout, else \c false.
266 * \note A \p timeout of \c -1 means wait forever. A \p timeout
269 bool (*wait)(struct lxc_container *c, const char *state, int timeout);
370 * \param timeout Seconds to wait before returning false.
375 bool (*shutdown)(struct lxc_container *c, int timeout);
H A Dlxccontainer.c599 static bool do_lxcapi_wait(struct lxc_container *c, const char *state, int timeout) argument
606 ret = lxc_wait(c->name, state, timeout, c->config_path);
614 /* we'll probably want to make this timeout configurable? */
615 int timeout = 5, ret, status; local
624 return do_lxcapi_wait(c, "RUNNING", timeout);
1600 static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout) argument
1627 retv = do_lxcapi_wait(c, "STOPPED", timeout);
/lxc/src/python-lxc/lxc/
H A D__init__.py328 def get_ips(self, interface=None, family=None, scope=None, timeout=0):
342 timeout = int(os.environ.get('LXC_GETIP_TIMEOUT', timeout))
346 if timeout == 0:
349 timeout -= 1
409 def wait(self, state, timeout=-1):
411 Wait for the container to reach a given state or timeout.
417 return _lxc.Container.wait(self, state, timeout)
/lxc/src/lua-lxc/
H A Dcore.c184 int timeout = luaL_checkinteger(L, 2); local
186 lua_pushboolean(L, !!c->shutdown(c, timeout));
194 int timeout = luaL_checkinteger(L, 3); local
196 lua_pushboolean(L, !!c->wait(c, state, timeout));
H A Dlxc.lua122 function container:shutdown(timeout)
123 return self.core:shutdown(timeout)
126 function container:wait(state, timeout)
127 return self.core:wait(state, timeout)
/lxc/templates/
H A Dlxc-gentoo.in39 # param: $2: the timeout for the lock
46 local timeout="$2"
50 printf "Attempting to obtain an exclusive lock (timeout: %s sec) named \"%s\"...\n" "${timeout}" "$lock_name"
52 flock -x -w "${timeout}" 50
818 alias wget="wget --timeout=8 --read-timeout=15 -c -t10 -nd"
H A Dlxc-alpine.in135 local timeout=$2
/lxc/src/python-lxc/
H A Dlxc.c1329 static char *kwlist[] = {"timeout", NULL};
1330 int timeout = -1; local
1333 &timeout))
1336 if (self->container->shutdown(self->container, timeout)) {
1537 static char *kwlist[] = {"state", "timeout", NULL};
1539 int timeout = -1; local
1542 &state, &timeout))
1545 if (self->container->wait(self->container, state, timeout)) {
1761 "shutdown(timeout = -1) -> boolean\n"
1817 "wait(state, timeout
[all...]

Completed in 756 milliseconds