Page MenuHomePhabricator

Make sure failure to remove temporary files does not cause error exit codes
AbandonedPublic

Authored by hach-que on Jul 23 2015, 12:53 AM.

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

For some reason on Windows, the files used for the streaming stdout / stderr remain locked when PHP exits. In this case, the automatic unlink fails, and PHP returns an error code.

Because we don't have much control of Windows and how it does it's file locking nonsense, gracefully ignore failure to remove TempFiles if $temp->setIgnoreRemovalFailure(true) is called.

Also, have a free "latest XHPAST built for Windows".

Test Plan

Replicated the issue and then set:

$this->windowsStdoutTempFile->setIgnoreRemovalFailure(true);
$this->windowsStderrTempFile->setIgnoreRemovalFailure(true);

and saw the failure go away. Set those values to false and saw the exception appear again. Set them back to true before running arc diff so that we actually fix the issue.

Diff Detail

Branch
winfilestreams
Lint
Lint SkippedExcuse: I get an exception about duplicate symbols, which looks like it's prefixing a comment block before the symbol name. It's most likely line endings causing this.
Unit
Unit Tests Skipped
Build Status
Buildable 7359
Build 7758: [Placeholder Plan] Wait for 30 Seconds
Build 7757: arc lint + arc unit

Event Timeline

hach-que retitled this revision from to Make sure failure to remove temporary files does not cause error exit codes.Jul 23 2015, 12:53 AM
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
hach-que updated this revision to Diff 33085.
eadler added a subscriber: eadler.Jul 23 2015, 1:14 AM
hach-que abandoned this revision.Dec 3 2015, 8:50 AM

We'll keep this patched locally while-ever we keep encountering the issue.