aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aurora ReviewBot" <wfar...@apache.org>
Subject Re: Review Request 33455: Use "a" mode instead of "w" when opening stdout and stderr.
Date Wed, 22 Apr 2015 23:29:51 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33455/#review81243
-----------------------------------------------------------


Master (352e0ef) is green with this patch.
  ./build-support/jenkins/build.sh

However, it appears that it might lack test coverage.

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 22, 2015, 10:47 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33455/
> -----------------------------------------------------------
> 
> (Updated April 22, 2015, 10:47 p.m.)
> 
> 
> Review request for Aurora and Brian Wickman.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use "a" mode instead of "w" when opening stdout and stderr.
> 
> This allows an external log rotation process to truncate stdout and stderr without causing
the creation of a sparse file.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/core/process.py 5ce138dab161d880c0bd58b87a6f5a54d4ca2f99

> 
> Diff: https://reviews.apache.org/r/33455/diff/
> 
> 
> Testing
> -------
> 
> With "w" mode testfile is 300 bytes despite being truncated externally.
> ```
> % python 3> testfile
> Python 2.7.6 (default, Sep  9 2014, 15:04:36)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> f = os.fdopen(3, 'w')
> >>> f.write(100 * 'a')
> >>> f.flush()
> 
> % echo -n '' > testfile
> 
> >>> f.write(200 * 'b')
> >>> f.flush()
> % ls -l testfile
> -rw-r--r--  1 ksweeney  staff  300 Apr 22 15:40 testfile
> ```
> 
> With "a" mode testfile is 200 bytes.
> ```
> % python 3> testfile
> Python 2.7.6 (default, Sep  9 2014, 15:04:36)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> f = os.fdopen(3, 'a')
> >>> f.write(100 * 'a')
> >>> f.flush()
> 
> % echo -n '' > testfile
> 
> >>> f.write(200 * 'b')
> >>> f.flush()
> 
> % ls -l testfile
> -rw-r--r--  1 ksweeney  staff  200 Apr 22 15:40 testfile
> ```
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message