Sync OpenBSD patchset 1153:

Add a queue of notifys and a way to turn them off and on (we do not want
notifys to happen during some commands). Based on code from George
Nachman.
This commit is contained in:
Tiago Cunha
2012-08-12 19:23:01 +00:00
parent 44307712ed
commit c8849ac990
3 changed files with 146 additions and 11 deletions

View File

@ -91,6 +91,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx)
if (c != NULL && c->session != NULL)
guards = c->flags & CLIENT_CONTROL;
notify_disable();
retval = 0;
TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
if (guards)
@ -128,6 +130,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx)
break;
}
}
notify_enable();
return (retval);
}