lkml.org 
[lkml]   [2000]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: SIGSEGV on fclose.
    Date

    bbl@dk.damgaard.com said:
    > in case you wonder: the problem arises from a program that closes a
    > file twice because it does not know that the file is allready closed.

    Don't do that then.

    Read the man page:
    ... any further access (including another call to fclose()) to
    the stream results in undefined behaviour.

    Returning SIGSEGV is permitted as 'undefined behaviour'. Just consider
    yourself lucky it didn't format your hard drive, pee on the carpet, and/or
    start global thermonuclear war.


    --
    dwmw2



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:57    [W:0.020 / U:0.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site