diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-06-30 07:17:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-06-30 07:17:38 +0000 |
commit | d85bfe83bf9ffa1959c5c618cf0b3ca568e0c6f6 (patch) | |
tree | 695e07cfc90aa43049d8413aabf3aeb2c4bd5f96 /src/or/cpuworker.c | |
parent | 584a0ae397bbe049c860bbc83f5a1c0152c3c4b7 (diff) | |
download | tor-d85bfe83bf9ffa1959c5c618cf0b3ca568e0c6f6.tar.gz tor-d85bfe83bf9ffa1959c5c618cf0b3ca568e0c6f6.zip |
Make errors retrievable from tor_socketpair; resolve bug 163.
svn:r4509
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index bcc50c06fb..eb264bfcfc 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -301,11 +301,11 @@ spawn_cpuworker(void) int *fdarray; int fd; connection_t *conn; + int err; fdarray = tor_malloc(sizeof(int)*2); - if (tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray) < 0) { - log(LOG_ERR, "Couldn't construct socketpair: %s", - tor_socket_strerror(tor_socket_errno(-1))); + if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray)) < 0) { + log(LOG_ERR, "Couldn't construct socketpair: %s", tor_socket_strerror(-err)); tor_cleanup(); tor_free(fdarray); exit(1); |