[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Andy Yang <yyu08@y...> |
| Subject: | [Caml-list] Wierd behavior of file reading when tried to start an executable in Ocaml code |
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