1. 08 Dec, 2011 1 commit
  2. 26 Oct, 2011 2 commits
  3. 20 Oct, 2011 1 commit
  4. 05 Sep, 2011 2 commits
  5. 25 Aug, 2011 1 commit
  6. 05 Aug, 2011 1 commit
  7. 25 Jul, 2011 1 commit
  8. 28 Apr, 2011 1 commit
  9. 27 Apr, 2011 1 commit
    • Iustin Pop's avatar
      Fix potential data-loss in utils.WriteFile · 437c3e77
      Iustin Pop authored
      
      
      os.write can do incomplete writes, as long as at least some bytes have
      been written (like write(2)):
      
      >>> os.write(fd, " " * 1300)
      1300
      >>> os.write(fd, " " * 1300)
      1300
      >>> os.write(fd, " " * 1300)
      1300
      >>> os.write(fd, " " * 1300)
      980
      >>> os.write(fd, " " * 1300)
      Traceback (most recent call last):
       File "<stdin>", line 1, in ?
      OSError: [Errno 28] No space left on device
      
      Note that incomplete write that only wrote 980 bytes, before the
      exception.
      
      To workaround this, we simply iterate until all data is
      written. Unittests could be written by using a parameter instead of
      hardcoding os.write and checking for incomplete writes.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      437c3e77
  10. 13 Apr, 2011 1 commit
  11. 11 Jan, 2011 4 commits