libchromeos: Make output redirection overwrite files.

When redirecting output, ProcessImpl was opening the
destination file with O_CREAT, O_EXCL, and O_TRUNC, which
don't make sense (why truncate when you're only allowed to
create new files?) and causes failures in the crash
reporter's log-collection code. Switch O_EXCL to O_NOFOLLOW.

BUG=chromium:405732
TEST=built it and checked that log collection works now

Change-Id: Ic24b4b8bf5806330ede22344ee7f911a91b87484
Reviewed-on: https://chromium-review.googlesource.com/242492
Trybot-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
1 file changed