From: Andy Yang <yyu08@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] Wierd behavior of file reading when tried to start an executable in Ocaml code
Date: Mon, 4 Oct 2004 04:13:25 -0700 (PDT) [thread overview]
Message-ID: <20041004111325.69884.qmail@web53209.mail.yahoo.com> (raw)
In-Reply-To: <012676D607FCF54E986746512C22CE7D0FE7AD@orsmsx407>
Hi,
I am trying to call some outside exectuables in Ocaml
code. So I tried Unix.system and Unix.exec. However I
found that the program cannot execute correctly if it
is called from Ocaml code, and at the same time it can
work smoothly if I run it directly from a console.
This program is a very simple console program, with
two files as its input. When I look into the code and
put some debugging code to print internal information
out, I found that when I start the program from Ocaml
code, the last several lines of the input file are
ignored. I added several extrae line at the end of
the file and tried again. The lines I added are still
ignored. The file is a simple text file, the final
line looks like this: 'CONF: 721 == 45 119 124'. It is
rather simple, right? I found that when I tried to
start the program inside Ocaml, the program will
ignore the last line. It is rather wierd and
frustrating. Any suggestions and insights are welcome.
Thanks.
Andy
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-10-04 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-30 17:30 [Caml-list] really HO Functions Harrison, John R
2004-10-04 11:13 ` Andy Yang [this message]
2004-10-04 11:28 ` [Caml-list] Wierd behavior of file reading when tried to start an executable in Ocaml code Keith Wansbrough
2004-10-04 12:40 ` skaller
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=20041004111325.69884.qmail@web53209.mail.yahoo.com \
--to=yyu08@yahoo.com \
--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