misfo/Shell-Turtlestein — pull request #29 by tresni (2012-12-19 00:42:40+00:00)
Title: Race condition for OS X

There is an apparent race condition here since "exec" fires asynchronously.

It appears the temp file is considered closed when the variable goes out of scope and so the file may be deleted before the command is actually run. This leads to fun statuses messages like:

```
/bin/sh: /var/folders/_w/10xgs8850ss_c6mn6cpvzlhw0000gn/T/tmpLQNlNY: No such file or directory
[Finished in 0.0s with exit code 1]
```

Setting `delete=False` prevents this however I'm not sure what the best way to clean up these temporary files after the fact is (or if the operating systems will eventually do it themselves.)