Skip to content

Conversation

@damuellen
Copy link
Contributor

Simple search and replace

}

public let NSTaskDidTerminateNotification: String = "NSTaskDidTerminateNotification"
public let ProcessDidTerminateNotification: String = "ProcessDidTerminateNotification"
Copy link
Member

@ikesyo ikesyo Nov 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Set the running flag to false

task.running = false
process.running = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property should be renamed to isRunning too: https://developer.apple.com/reference/foundation/process/1415788-isrunning

@damuellen
Copy link
Contributor Author

Thanks @ikesyo
I have adapted it according to your comments.

}

public let NSTaskDidTerminateNotification: String = "NSTaskDidTerminateNotification"
public let didTerminateNotification: String = "NSTaskDidTerminateNotification"
Copy link
Member

@ikesyo ikesyo Nov 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct, the value is a Process's static property and the type is NSNotification.Name:

extension Process {
    public static let didTerminateNotification: NSNotification.Name = ...
}

task.launchPath = path
task.arguments = arguments
task.launch()
open class func launchedTaskWithLaunchPath(_ path: String, arguments: [String]) -> Process {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikesyo
Copy link
Member

ikesyo commented Nov 28, 2016

The type of standardInput, standardOutput and standardError should be changed to Any?.

Copy link
Contributor

@phausler phausler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks fine to me modulo some of the other commentary which is on point

EADE0BB61BD15E0000C49C64 /* NSSortDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B781BD15DFF00C49C64 /* NSSortDescriptor.swift */; };
EADE0BB71BD15E0000C49C64 /* NSStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B791BD15DFF00C49C64 /* NSStream.swift */; };
EADE0BB81BD15E0000C49C64 /* NSTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B7A1BD15DFF00C49C64 /* NSTask.swift */; };
EADE0BB81BD15E0000C49C64 /* Process.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B7A1BD15DFF00C49C64 /* Process.swift */; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see a build.py alteration for this; might be a problem on linux builds (which is a pre-requisite to merging)

@phausler
Copy link
Contributor

@swift-ci Please test

@phausler phausler self-assigned this Nov 28, 2016
@damuellen
Copy link
Contributor Author

Updated build.py and comments implemented

}

public let NSTaskDidTerminateNotification: String = "NSTaskDidTerminateNotification"
public let didTerminateNotification = NSNotification.Name(rawValue: "NSTaskDidTerminateNotification")
Copy link
Member

@ikesyo ikesyo Nov 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still defined as a global constant, not as a static property of Process.

@damuellen
Copy link
Contributor Author

@ikesyo Thanks again for reviewing.

@parkera
Copy link
Contributor

parkera commented Nov 28, 2016

@swift-ci please test

@parkera parkera merged commit 418ebb8 into swiftlang:master Dec 1, 2016
@damuellen damuellen deleted the SR-3279 branch December 2, 2016 07:59
@naithar naithar mentioned this pull request Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants