Branch: Tag:

1999-06-29

1999-06-29 16:02:58 by Martin Stjernholm <mast@lysator.liu.se>

Disable callbacks temporarily in File.set_blocking().

Rev: lib/modules/Stdio.pmod:1.39

1: - // $Id: Stdio.pmod,v 1.38 1999/04/21 06:55:40 js Exp $ + // $Id: Stdio.pmod,v 1.39 1999/06/29 16:02:58 mast Exp $      #include <string.h>   
23:    if(!_fd) \    { \    throw(({ \ -  "Stdio.File(): line "+__LINE__+" on closed file.\n"+ \ +  "Stdio.File(): line "+__LINE__+" on closed file.\n"+ \    (__closed_backtrace ? \    sprintf("File was closed from:\n %-=200s\n",__closed_backtrace) : \    "This file has never been open.\n" ), \
337:    void set_blocking()    {    CHECK_OPEN(); +  ::_disable_callbacks(); // Thread safing    SET(read_callback,0);    SET(write_callback,0);    ___close_callback=0;
345:    SET(write_oob_callback,0);   #endif    ::set_blocking(); +  ::_enable_callbacks();    }   };