 	/// anywhere else, as it may close unexpectedly.
 	func transferReadsToProducer() -> SignalProducer<dispatch_data_t, ReactiveTaskError> {
 		return SignalProducer { observer, disposable in
+			dispatch_group_enter(self.group)
 			let channel = dispatch_io_create(DISPATCH_IO_STREAM, self.readFD, self.queue) { error in
 				if error == 0 {
 					sendCompleted(observer)

	/// Returns a producer that will complete or error.
	func writeDataFromProducer(producer: SignalProducer<NSData, NoError>) -> SignalProducer<(), ReactiveTaskError> {
		return SignalProducer { observer, disposable in
			let channel = dispatch_io_create(DISPATCH_IO_STREAM, self.writeFD, self.queue) { error in
				if error == 0 {
					sendCompleted(observer)

							task.standardOutput = stdoutPipe.writeHandle
							task.standardError = stderrPipe.writeHandle

							dispatch_group_enter(group)
							task.terminationHandler = { task in
								let terminationStatus = task.terminationStatus
								if terminationStatus == EXIT_SUCCESS {
