Set the pipe fd's to nonblocking.
2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's to nonblocking. svn path=/trunk/; revision=10847
This commit is contained in:
committed by
Jeffrey Stedfast
parent
40c22b25f1
commit
15aeda78aa
@ -1,3 +1,8 @@
|
||||
2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
|
||||
to nonblocking.
|
||||
|
||||
2001-07-06 Peter Williams <peterw@ximian.com>
|
||||
|
||||
* camel-object.c (camel_object_unref): Make sure that after the
|
||||
|
||||
@ -332,6 +332,10 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
|
||||
close (diag_fds[1]);
|
||||
close (passwd_fds[0]);
|
||||
|
||||
fcntl (ip_fds[1], F_SETFL, O_NONBLOCK);
|
||||
fcntl (op_fds[0], F_SETFL, O_NONBLOCK);
|
||||
fcntl (diag_fds[0], F_SETFL, O_NONBLOCK);
|
||||
|
||||
timeout.tv_sec = 10; /* timeout in seconds */
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
|
||||
@ -286,9 +286,9 @@ imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex)
|
||||
str->str + 1, length);
|
||||
if (nread == -1) {
|
||||
if (errno == EINTR)
|
||||
camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
|
||||
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
|
||||
else
|
||||
camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
|
||||
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
|
||||
camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
|
||||
goto lose;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user