Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close (again) #3442

Closed
vicuna opened this issue Jul 19, 2002 · 2 comments
Closed

close (again) #3442

vicuna opened this issue Jul 19, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 19, 2002

Original bug ID: 1249
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Emmanuel Renieris
Version: CVS
OS: Linux
Submission from: miette.cs.brown.edu (128.148.38.66)

It seems that close_channel in io.c does not check the return value of
close(2).
The Linux man page warns that this is potentially the only place where a write
error might get detected (if I understand correctly, when write(2) returns
after
putting data in a buffer but doesn't write it to disk until the file is
closed).

-- Manos

@vicuna
Copy link
Author

vicuna commented Oct 29, 2002

Comment author: administrator

It seems that close_channel in io.c does not check the return value of
close(2).

I have fixed this in the current working version (3.06+11).
Now Pervasives.close_in and Pervasives.close_out will raise an
exception if the OS signals an error on close.

I have also added close_in_noerr and close_out_noerr for the
very common case when you want to ignore errors.

However, this change may break some programs, so you should be
aware that we might decide to undo it (or find some other solution)
before the next release.

-- Damien

@vicuna vicuna closed this as completed Oct 29, 2002
@vicuna
Copy link
Author

vicuna commented Oct 29, 2002

Comment author: administrator

It seems that close_channel in io.c does not check the return value of
close(2).

I have fixed this in the current working version (3.06+11).
Now Pervasives.close_in and Pervasives.close_out will raise an
exception if the OS signals an error on close.

I have also added close_in_noerr and close_out_noerr for the
very common case when you want to ignore errors.

However, this change may break some programs, so you should be
aware that we might decide to undo it (or find some other solution)
before the next release.

-- Damien

Grand merci, oh maître de la librairie réputée standard.

--Luc

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant