caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Johann Spies <jhspies@adept.co.za>
To: caml-list@inria.fr
Subject: [Caml-list] using open_out_gen, output_string and close_out
Date: 06 Aug 2001 22:37:01 +0200	[thread overview]
Message-ID: <8766c12adu.fsf@adept.co.za> (raw)

The following illustrates my problem:
-------------------------------
$ocaml
        Objective Caml version 3.00

# let l = open_out_gen [Open_creat;Open_append] 0o666 "/tmp/xx";;
val l : out_channel = <abstr>
# close_out l;;
- : unit = ()
# let l = open_out_gen [Open_creat;Open_append] 0o666 "/tmp/xx";;
val l : out_channel = <abstr>
# output_string l "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  ccccccccccccccccccccccccccccccccc";;
- : unit = ()
# close_out l;;
Uncaught exception: Sys_error "Bad file descriptor".
#
------------------------------------------------------

What is happening here?  After exiting ocaml, the file /tmp/xx was
empty.

Johann
-- 
J.H. Spies - Tel. 082 782 0336 / 021-808 4036(w)  
             Posbus 4668, Tygervallei 7536
     "Be still before the LORD and wait patiently for him;
      do not fret when men succeed in their ways, when they
      carry out their wicked schemes." 
                            Psalms 37:7 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-08-06 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06 20:37 Johann Spies [this message]
2001-08-07  7:36 ` Xavier Leroy
2001-08-07 10:46   ` Johann Spies
2001-08-07  0:36 Jeremy Fincher
2001-08-07  8:33 Johann Spies

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8766c12adu.fsf@adept.co.za \
    --to=jhspies@adept.co.za \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).