-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for iOS 15 and Rootless - Refactored tweaksettings-utility with support for forking child processes
- Loading branch information
1 parent
3dd6925
commit 4162605
Showing
18 changed files
with
315 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#import <Foundation/NSObject.h> | ||
|
||
@class NSString, NSArray, NSDictionary; | ||
|
||
@interface NSTask : NSObject | ||
|
||
// Create an NSTask which can be run at a later time | ||
// An NSTask can only be run once. Subsequent attempts to | ||
// run an NSTask will raise. | ||
// Upon task death a notification will be sent | ||
// { Name = NSTaskDidTerminateNotification; object = task; } | ||
// | ||
|
||
- (_Nullable instancetype)init; | ||
|
||
// set parameters | ||
// these methods can only be done before a launch | ||
// if not set, use current | ||
// if not set, use current | ||
|
||
// set standard I/O channels; may be either an NSFileHandle or an NSPipe | ||
- (void)setStandardInput:(id _Nullable)input; | ||
- (void)setStandardOutput:(id _Nullable)output; | ||
- (void)setStandardError:(id _Nullable)error; | ||
|
||
// get parameters | ||
@property (NS_NONATOMIC_IOSONLY, copy) NSString *_Nullable launchPath; | ||
@property (NS_NONATOMIC_IOSONLY, copy) NSArray *_Nullable arguments; | ||
@property (NS_NONATOMIC_IOSONLY, copy) NSDictionary *_Nullable environment; | ||
@property (NS_NONATOMIC_IOSONLY, copy) NSString *_Nullable currentDirectoryPath; | ||
@property(NS_NONATOMIC_IOSONLY, copy) NSURL *_Nullable currentDirectoryURL; | ||
|
||
// get standard I/O channels; could be either an NSFileHandle or an NSPipe | ||
- (id _Nullable)standardInput; | ||
- (id _Nullable)standardOutput; | ||
- (id _Nullable)standardError; | ||
|
||
// actions | ||
- (void)launch; | ||
|
||
- (void)interrupt; // Not always possible. Sends SIGINT. | ||
- (void)terminate; // Not always possible. Sends SIGTERM. | ||
|
||
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL suspend; | ||
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL resume; | ||
|
||
// status | ||
@property (NS_NONATOMIC_IOSONLY, readonly) int processIdentifier; | ||
@property (NS_NONATOMIC_IOSONLY, getter = isRunning, readonly) BOOL running; | ||
|
||
@property (NS_NONATOMIC_IOSONLY, readonly) int terminationStatus; | ||
@property (copy, nonnull) void (^terminationHandler)(NSTask *_Nonnull); | ||
|
||
@end | ||
|
||
@interface NSTask (NSTaskConveniences) | ||
|
||
+ (NSTask *_Nullable)launchedTaskWithLaunchPath:(NSString *_Nonnull)path arguments:(NSArray *_Nullable)arguments; | ||
// convenience; create and launch | ||
|
||
- (void)waitUntilExit; | ||
// poll the runLoop in defaultMode until task completes | ||
|
||
@end | ||
|
||
FOUNDATION_EXPORT NSString *_Nullable const NSTaskDidTerminateNotification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifdef THEOS_PACKAGE_INSTALL_PREFIX | ||
#define ROOT_PATH(cPath) THEOS_PACKAGE_INSTALL_PREFIX cPath | ||
#define ROOT_PATH_NS(path) @THEOS_PACKAGE_INSTALL_PREFIX path | ||
#define ROOT_PATH_NS_VAR(path) [@THEOS_PACKAGE_INSTALL_PREFIX stringByAppendingPathComponent:path] | ||
#define ROOT_PATH_VAR(cPath) ROOT_PATH_NS_VAR(@cPath).fileSystemRepresentation | ||
#else | ||
#define ROOT_PATH(cPath) cPath | ||
#define ROOT_PATH_NS(path) path | ||
#define ROOT_PATH_NS_VAR(path) path | ||
#define ROOT_PATH_VAR(cPath) cPath | ||
#endif |
Oops, something went wrong.