Pull request for inclusion in `unix' module of fsync(2), fdatasync(2), posix_fadvise(2) and posix_fallocate(2)

Thomas Schilling nominolo at googlemail.com
Sun Dec 22 10:32:20 UTC 2013


Looks like GHC HQ maintains this package.  I don't think it'll make it
into the version released with 7.8, though.

I do have another question, though.  How should Haskell code using the
`unix` library check for whether `fsync` are implemented or not?  If I
call `fsync` I wouldn't want to get a runtime `error` call if the
platform doesn't support it.  Either I should be able to check at
compile time, or I should get a defined exception call which then must
be handled by the library.  In either case it should be documented
with the function.

On 12 December 2013 22:33, Ricardo Catalinas Jiménez
<jimenezrick at gmail.com> wrote:
> If anyone else doesn't have any other objection, how should I proceed?
> Should I open a ticket in ghc's Trac asking for integration of this
> patch?
>
> Regards,
> /Ricardo
>
>
> On Wed, Dec 11, 2013 at 10:55 PM, Ricardo Catalinas Jiménez
> <jimenezrick at gmail.com> wrote:
>> Shame on me! Wrong copy&paste from fsync to fdatasync... Fixed and
>> tested on Linux. Changelog corrected and commits squashed.
>>
>> Review:
>> https://github.com/jimenezrick/unix/compare/master...file-utils
>> /Ricardo
>>
>>
>> On Wed, Dec 11, 2013 at 4:00 PM, Thomas Schilling
>> <nominolo at googlemail.com> wrote:
>>> Also, adding a function should bump the third component, not the fourth.
>>>
>>> On 11 December 2013 16:57, Thomas Schilling <nominolo at googlemail.com> wrote:
>>>> There's a typo in line:
>>>>
>>>> +#ifndef HAVE_FDAYASYNC
>>>>
>>>> I assume it should read HAVE_FDATASYNC
>>>>
>>>> Did you try to compile this on a system that has fdatasync?
>>>>
>>>> On 7 December 2013 20:20, Ricardo Catalinas Jiménez
>>>> <jimenezrick at gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> Please review this pull request:
>>>>> https://github.com/jimenezrick/unix/compare/master...file-utils.patch
>>>>>
>>>>> If you find interesting this patch, then:
>>>>> git pull https://github.com/jimenezrick/unix.git file-utils
>>>>>
>>>>> /Ricardo
>>>>> _______________________________________________
>>>>> Libraries mailing list
>>>>> Libraries at haskell.org
>>>>> http://www.haskell.org/mailman/listinfo/libraries


More information about the Libraries mailing list