Unbuffered output ports not implemented

Bug #251204 reported by Michael D. Adams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
Low
Abdulaziz Ghuloum

Bug Description

Unbuffered output ports appear to actually be buffered.

(Found when poking around; not needed for anything I'm doing)

$ ./src/ikarus -b ./scheme/ikarus.boot
Ikarus Scheme version 0.0.3+ (revision 1549, build 2008-07-23)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

> (define x (open-file-output-port "/tmp/testfile.ss" (file-options) (buffer-mode none))) ;; Try to open unbuffered binary output port
> (put-u8 x 97)
> ^Z
[2]+ Stopped ./src/ikarus -b ./scheme/ikarus.boot
$ ls -l /tmp/testfile.ss
-rw------- 1 adamsmd students 0 Jul 23 12:03 /tmp/testfile.ss

Since the file size is zero, the port is obviously buffered even though we asked for an unbuffered port. (Later flushing the port though does write to the file.)

Related branches

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Yes, the buffer-mode is currently ignored. Will investigate how bad it would be to add unbuffered ports.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1636. Let me know if I messed something up :-)

$ ikarus
Ikarus Scheme version 0.0.3+ (revision 1636, build 2008-10-18)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

> (define x (open-file-output-port "/tmp/testfile.ss" (file-options) (buffer-mode none)))
> (put-u8 x 97)
> ^Z
[1]+ Stopped ikarus
$ ls -l /tmp/testfile.ss
-rw-r--r-- 1 aghuloum wheel 1 Oct 18 17:01 /tmp/testfile.ss

Changed in ikarus:
status: Confirmed → Fix Committed
Changed in ikarus:
milestone: none → 0.0.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.