Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2006 14:31:56 +0000 (UTC)
From:      "Andrey A. Chernov" <ache@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libc/stdio freopen.c
Message-ID:  <200610161431.k9GEVuaM091870@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
ache        2006-10-16 14:31:56 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdio       freopen.c 
  Log:
  file == NULL:
  Issue __sflush() before possible setting O_APPEND mode or ftruncate(),
  write to wrong place may occurse oserwise.
  Use simplified _sseek() to the start, if no O_APPEND is set, instead
  of _fseeko() (_sseek() to the end, if O_APPEND, occurse later, as for
  file != NULL).
  Don't check seek error return, as original fopen() and freopen() never
  does.
  
  file != NULL:
  Add missing _sseek() to the end.
  
  Revision  Changes    Path
  1.17      +14 -9     src/lib/libc/stdio/freopen.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610161431.k9GEVuaM091870>