You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4154 Reporter: shawjef3 Status: closed (set by @damiendoligez on 2006-11-17T14:29:37Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.09.3 Category: ~DO NOT USE (was: OCaml general)
Bug description
Under cygwin, Unix.fstat gives the correct size for files opened with Unix.openfile but not for pipes. It prevents me from running an application that works fine under mac os x which marshals data between threads. This may be an issue with cygwin or ocaml, I don't know which for sure.
for a file:
let file = Unix.openfile "pipetest.ml" [Unix.O_RDONLY] 0;;
val file : Unix.file_descr =
(Unix.fstat file).Unix.st_size;;
: int = 1056
for a pipe:
$ ./ocamlunix
Objective Caml version 3.09.3
let pipe = Unix.pipe();;
val pipe : Unix.file_descr * Unix.file_descr = (, )
Original bug ID: 4154
Reporter: shawjef3
Status: closed (set by @damiendoligez on 2006-11-17T14:29:37Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.09.3
Category: ~DO NOT USE (was: OCaml general)
Bug description
Under cygwin, Unix.fstat gives the correct size for files opened with Unix.openfile but not for pipes. It prevents me from running an application that works fine under mac os x which marshals data between threads. This may be an issue with cygwin or ocaml, I don't know which for sure.
for a file:
let file = Unix.openfile "pipetest.ml" [Unix.O_RDONLY] 0;;
val file : Unix.file_descr =
(Unix.fstat file).Unix.st_size;;
for a pipe:
$ ./ocamlunix
Objective Caml version 3.09.3
let pipe = Unix.pipe();;
val pipe : Unix.file_descr * Unix.file_descr = (, )
let buffer1 = String.make 10 ' ';;
val buffer1 : string = " "
Unix.write (snd pipe) buffer1 0 10;;
(Unix.fstat (fst pipe)).Unix.st_size;;
Unix.fstat (fst pipe);;
{Unix.st_dev = 254; Unix.st_ino = 0; Unix.st_kind = Unix.S_FIFO;
Unix.st_perm = 292; Unix.st_nlink = 1; Unix.st_uid = 500; Unix.st_gid = 513;
Unix.st_rdev = 254; Unix.st_size = 0; Unix.st_atime = 1163017327.;
Unix.st_mtime = 1163017327.; Unix.st_ctime = 1163017327.}
let buffer2 = String.make 10 '+';;
val buffer2 : string = "++++++++++"
Unix.read (fst pipe) buffer2 0 10;;
buffer2;;
The text was updated successfully, but these errors were encountered: