Summary

please add ability to call fchdir to posix module.

Metadata

Attachments

Description

The fchdir call is like the chdir call, except it takes an open file descriptor rather than a filepath.

Using this call on Unix is more reliable for keeping a handle on where you are in the filesystem, relative to using a pathname: a file descriptor will point to the same resource even when the path (or a component of it) is renamed.

Will you apply this patch to chicken-core?

If this patch is not acceptable, what must I do to get it applied?

Changes and comments

[2011-08-22 16:31:33 UTC] alanpost attached posixunix.scm.patch (description=Patch to add fchdir syscall to chicken-core.)

[2011-08-24 09:36:05 UTC] felix changed status from new to assigned

[2011-08-24 09:36:05 UTC] felix set owner to felix

[2011-08-24 09:36:05 UTC] felix changed type from defect to enhancement

[2011-08-24 09:36:05 UTC] felix wrote:

There is no such thing for Windows, I'm afraid. Thanks for the suggestion, I'll add this (plus a stub for posixwin.scm).

[2011-08-26 13:51:58 UTC] felix wrote:

Would you mind terribly if I rename it to `change-directory*? That way it would correspond with `open-input-file*`, etc.

[2011-08-26 15:30:19 UTC] alanpost wrote:

Replying to felix: > Would you mind terribly if I rename it to `change-directory*? That way it would correspond with `open-input-file*`, etc.

I don't mind one bit. change-directory/fd was the best name I could come up with, but I was not happy with it. I like your proposal for `change-directory*`, let us use that.

[2011-08-31 10:26:39 UTC] felix changed status from assigned to closed

[2011-08-31 10:26:39 UTC] felix set resolution to fixed

[2011-08-31 10:26:39 UTC] felix wrote:

Has been added in "master" - thanks again, Alan.

[2011-08-31 17:28:45 UTC] alanpost wrote:

Replying to felix: > Has been added in "master" - thanks again, Alan.

There is an extra closing parenthesis in this patch that will need to be removed. I've done so locally and this change is working for me, I've renamed all of my calls to the now-official name.

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted