mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-12-22 07:30:40 +00:00
91878398b4
git-svn-id: svn://qnap.local/TwoTerm/trunk@1998 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
45 lines
811 B
Objective-C
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
|