cannot close stdio
parent
f4c239a992
commit
6431535692
|
@ -25,6 +25,7 @@
|
|||
|
||||
+ native:
|
||||
|
||||
- number upgrading errors
|
||||
- do something about "base" variable -- too fragile
|
||||
ERROR: I/O error: [ "primitive_read_line_fd_8" "Resource temporarily unavailable" ]
|
||||
- errors: don't show .factor-rc
|
||||
|
|
|
@ -48,7 +48,7 @@ USE: strings
|
|||
|
||||
: init-stdio ( -- )
|
||||
#! Initialize standard input/output.
|
||||
stdin stdout <char-stream> "stdio" set ;
|
||||
stdin stdout <char-stream> <stdio-stream> "stdio" set ;
|
||||
|
||||
: init-environment ( -- )
|
||||
#! Initialize OS-specific constants.
|
||||
|
|
|
@ -104,7 +104,7 @@ USE: namespaces
|
|||
[ "socket" get ] bind accept-fd <socket-stream> ;
|
||||
|
||||
: init-stdio ( -- )
|
||||
stdin stdout <fd-stream> "stdio" set ;
|
||||
stdin stdout <fd-stream> <stdio-stream> "stdio" set ;
|
||||
|
||||
: exists? ( file -- ? )
|
||||
#! This is terrible.
|
||||
|
|
|
@ -27,10 +27,16 @@
|
|||
|
||||
IN: stdio
|
||||
USE: errors
|
||||
USE: kernel
|
||||
USE: namespaces
|
||||
USE: stack
|
||||
USE: streams
|
||||
|
||||
: <stdio-stream> ( stream -- stream )
|
||||
#! We disable fclose on stdio so that various tricks like
|
||||
#! with-stream can work.
|
||||
clone [ [ ] "fclose" set ] extend ;
|
||||
|
||||
: flush ( -- )
|
||||
"stdio" get fflush ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue