TwoTerm/ChildMonitor.h
Kelvin Sherlock 91878398b4 Thread to monitor child.
git-svn-id: svn://qnap.local/TwoTerm/trunk@1998 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
2011-01-17 16:32:39 +00:00

45 lines
811 B
Objective-C

//
// ChildMonitor.h
// 2Term
//
// Created by Kelvin Sherlock on 1/16/2011.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
/*
* An NSThread to monitor a pid and fd.
* requires 10.5+
*
*/
#import <Foundation/Foundation.h>
@class ChildMonitor;
@protocol ChildMonitorDelegate
-(void)childDataAvailable: (ChildMonitor *)monitor;
-(void)childFinished: (ChildMonitor *)monitor;
@end
@interface ChildMonitor : NSThread {
pid_t _childPID;
int _fd;
int _childStatus;
BOOL _childFinished;
id<ChildMonitorDelegate> _delegate;
}
@property (assign) BOOL childFinished;
@property (assign) int childStatus;
@property (nonatomic, assign) pid_t childPID;
@property (nonatomic, assign) int fd;
@property (nonatomic, assign) id<ChildMonitorDelegate> delegate;
@end