Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Redirect stdout to a file, to work around a hang in iOS 5.1.

Change-Id: If28a5c60f1f1366600701efb3544cc2125daa244
http://www.couchbase.com/issues/browse/CBMI-72
Reviewed-on: http://review.couchbase.org/13924
Reviewed-by: Chris Anderson <jchris@couchbase.com>
Tested-by: Jens Alfke <jens@couchbase.com>
  • Loading branch information...
commit abc0542eb1c2a2c735cb66d25c50878f92730d1a 1 parent 4c211a4
Jens Alfke snej authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 Framework/Classes/CouchbaseMobile.m
5 Framework/Classes/CouchbaseMobile.m
@@ -187,6 +187,11 @@ - (BOOL)start
187 187 fromDir: _bundlePath
188 188 toDir: _rootDirectory])
189 189 return NO;
  190 +
  191 + // Redirect stdout somewhere. Otherwise Erlang will lock up in iOS 5.1+ when it calls printf. (CBMI-72)
  192 + NSString* stdoutFile = [self.logDirectory stringByAppendingPathComponent: @"stdout.txt"];
  193 + NSLog(@"Couchbase: Redirecting stdout to %@", stdoutFile);
  194 + freopen([stdoutFile UTF8String], "w+", stdout);
190 195
191 196 _started = YES;
192 197 [self performSelector: @selector(startupTimeout) withObject: nil afterDelay: kWaitTimeout];

0 comments on commit abc0542

Please sign in to comment.
Something went wrong with that request. Please try again.