[Driver] Fix temporary directory leak when running inplace jobs#2095
[Driver] Fix temporary directory leak when running inplace jobs#2095ramonasuncion wants to merge 1 commit into
Conversation
|
@swift-ci test |
1 similar comment
|
@swift-ci test |
|
Actually, I'll probably extract the cleanup to a function. |
owenv
left a comment
There was a problem hiding this comment.
Moving the deletion before the driver re-execs isn't sufficient here because the temporary directory might contain e.g. a response file required by the job we re-exec to
Oop. This is more involved. I'll get back to you, I need to do more digging. 😅 |
|
@owenv Does this make sense? I'm thinking of changing up swift-driver/Sources/SwiftDriver/Execution/ArgsResolver.swift Lines 59 to 65 in d7c1050 In swift-driver/Sources/SwiftDriverExecution/SwiftDriverExecutor.swift Lines 52 to 71 in d7c1050 I think it's mainly just moving the different execution paths around. I’ve never used Swift, so hopefully this isn’t too hard to implement. |
|
It's probably easier if I try to implement it and you give me feedback. |
Closes #2049
The defer block doesn't run because execute doesn't return on success, but defer is still needed for all other exit paths.
swift-driver/Sources/SwiftDriver/Driver/Driver.swift
Lines 1930 to 1935 in 3745e54