long time();
+#define DEADLOCK_WAIT (3 * 60) /* number of seconds to wait after
+ a deadlock before trying again. */
+
/* declared global so that we can get the current time from different places. */
struct timeval tv;
scream, NULL);
if (status) {
com_err(whoami, status,
- " setting service state, trying again");
+ " setting service state, sleeping");
+ sleep(DEADLOCK_WAIT);
status = sms_query("set_server_internal_flags", 6, qargv,
scream, NULL);
if (status)
6, qargv, scream, NULL);
if (status) {
com_err(whoami, status,
- " setting service state, trying again");
+ " setting service state, sleeping");
+ sleep(DEADLOCK_WAIT);
status = sms_query("set_server_internal_flags",
6, qargv, scream, NULL);
if (status)
9, argv,scream,NULL);
if (status) {
com_err(whoami, status,
- " setting host state, trying again");
+ " setting host state, sleeping");
+ sleep(DEADLOCK_WAIT);
status = sms_query("set_server_host_internal",
9, argv,scream,NULL);
if (status)
close(lock_fd);
status = sms_query("set_server_host_internal", 9, argv,scream,NULL);
if (status) {
- com_err(whoami, status, " setting host state, trying again");
+ com_err(whoami, status, " setting host state, sleeping");
+ sleep(DEADLOCK_WAIT);
status = sms_query("set_server_host_internal", 9, argv,scream,NULL);
if (status)
com_err(whoami, status, " setting host state again");