Push stdout and stderr to clients more aggressively, and add an event to

continue if the send fails.
This commit is contained in:
nicm
2015-11-14 09:41:06 +00:00
parent 908e6bb68f
commit c56b81a2ce
11 changed files with 101 additions and 61 deletions

View File

@ -289,7 +289,7 @@ client_main(struct event_base *base, int argc, char **argv, int flags)
*
* "sendfd" is dropped later in client_dispatch_wait().
*/
if (pledge("stdio unix sendfd proc exec tty", NULL) != 0)
if (0 && pledge("stdio unix sendfd proc exec tty", NULL) != 0)
fatal("pledge failed");
/* Free stuff that is not used in the client. */
@ -541,7 +541,7 @@ client_dispatch_wait(struct imsg *imsg)
* get the first message from the server.
*/
if (!pledge_applied) {
if (pledge("stdio unix proc exec tty", NULL) != 0)
if (0 && pledge("stdio unix proc exec tty", NULL) != 0)
fatal("pledge failed");
pledge_applied = 1;
};