GNU bug report logs - #46220
Fwd: Some non-standard O_* flags are missing

Previous Next

Package: guile;

Reported by: bug-guile <at> gnu.org

Date: Sun, 31 Jan 2021 21:31:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46220 in the body.
You can then email your comments to 46220 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#46220; Package guile. (Sun, 31 Jan 2021 21:31:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to bug-guile <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 31 Jan 2021 21:31:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guile <at> gnu.org
Subject: Fwd: Some non-standard O_* flags are missing
Date: Sun, 31 Jan 2021 22:30:22 +0100
[Message part 1 (text/plain, inline)]
Hi guilers,

I've accidentally sent the message to guile-devel instead
of bug-guile.  The bug report is forwarded here.
[Message part 2 (message/rfc822, inline)]
From: Maxime Devos <maximedevos <at> telenet.be>
To: guile-devel <at> gnu.org
Subject: Some non-standard O_* flags are missing
Date: Sun, 31 Jan 2021 22:13:10 +0100
[Message part 3 (text/plain, inline)]
Hi guilers,

I noticed the following open flags are not defined:
O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK,
O_SHLOCK, O_EXLOCK, O_ASYNC, O_NOATIME.

Some of these are Hurd-specific, Linux-specific
and BSD-specific.  I'm particularily interested
in O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK
and O_NOATIME, the others don't matter for me,
though they may be useful for others.

Could extra O_* flags be exported to Guile (in libguile/filesys.c)
on systems where they are defined?

Greetings,
Maxime
-- 
Maxime Devos <maximedevos <at> telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos
[signature.asc (application/pgp-signature, inline)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#46220; Package guile. (Tue, 02 Mar 2021 18:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 46220 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
Cc: 46220 <at> debbugs.gnu.org
Subject: Re: Some non-standard O_* flags are missing
Date: Tue, 02 Mar 2021 19:30:01 +0100
[Message part 1 (text/plain, inline)]
Hi guilers,

Attached is a patch that exports O_NOFOLLOW & others
when available.  While testing, I found some weirdness
(kernel: Linux).

$ ./meta/build-env guile
scheme@(guile-user)> O_NOFOLLOW
$1 = 131072
scheme@(guile-user)> O_NOTRANS
$2 = 0
scheme@(guile-user)> O_LARGEFILE
$3 = 0

O_NOFOLLOW is exported as expected.  O_NOTRANS is exported,
even though on the Linux kernel (O_NOTRANS is Hurd-specific).
O_LARGEFILE is 0, which could be correct I suppose, but if
files are opened in large file mode by default I don't really
see a point in defining O_LARGEFILE.

This seems orthogonal to this bug (well, feature request), though.

Greetings,
Maxime.
[0001-Define-O_NOFOLLOW-and-various-other-flags-when-suppo.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#46220; Package guile. (Tue, 09 Mar 2021 19:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 46220 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 46220 <at> debbugs.gnu.org
Subject: Re: Fwd: Some non-standard O_* flags are missing
Date: Tue, 09 Mar 2021 20:03:27 +0100
[Message part 1 (text/plain, inline)]
I forgot to include O_PATH, which (in combination with O_NOFOLLOW)
is required for opening a symbolic link.  See revised patch in attachment.
[0001-Define-O_NOFOLLOW-and-various-other-flags-when-suppo.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#46220; Package guile. (Sun, 02 May 2021 14:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 46220 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Andy Wingo <wingo <at> pobox.com>, 46220 <at> debbugs.gnu.org
Subject: Re: bug#46220: Fwd: Some non-standard O_* flags are missing
Date: Sun, 02 May 2021 16:05:19 +0200
Hi Maxime,

Maxime Devos <maximedevos <at> telenet.be> skribis:

> From d769a75962c64804f354a0133494491626b8b2dc Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos <at> telenet.be>
> Date: Tue, 2 Mar 2021 18:03:22 +0100
> Subject: [PATCH] Define `O_NOFOLLOW' and various other flags when supported.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * libguile/filesys.c (scm_init_filesys): Define ‘O_IGNORE_CTTY’,
>   ‘O_NOLINK’, ‘O_NOFOLLOW’, ‘O_PATH’, ‘O_TMPFILE’, ‘O_SHLOCK’,
>   ‘O_EXLOCK’, ‘O_ASYNC’, ‘O_NOATIME’, ‘O_DIRECTORY’, ‘O_CLOEXEC’
>   and ‘O_DIRECT’ when available.
> ---
>  libguile/filesys.c | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)

The patch LGTM.  I’ll apply it later today if there are no objections.

Thanks!

Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 08 May 2021 10:06:02 GMT) Full text and rfc822 format available.

Notification sent to bug-guile <at> gnu.org:
bug acknowledged by developer. (Sat, 08 May 2021 10:06:02 GMT) Full text and rfc822 format available.

Message #19 received at 46220-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 46220-done <at> debbugs.gnu.org
Subject: Re: bug#46220: Fwd: Some non-standard O_* flags are missing
Date: Sat, 08 May 2021 12:05:32 +0200
Hi Maxime,

Maxime Devos <maximedevos <at> telenet.be> skribis:

> From d769a75962c64804f354a0133494491626b8b2dc Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos <at> telenet.be>
> Date: Tue, 2 Mar 2021 18:03:22 +0100
> Subject: [PATCH] Define `O_NOFOLLOW' and various other flags when supported.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * libguile/filesys.c (scm_init_filesys): Define ‘O_IGNORE_CTTY’,
>   ‘O_NOLINK’, ‘O_NOFOLLOW’, ‘O_PATH’, ‘O_TMPFILE’, ‘O_SHLOCK’,
>   ‘O_EXLOCK’, ‘O_ASYNC’, ‘O_NOATIME’, ‘O_DIRECTORY’, ‘O_CLOEXEC’
>   and ‘O_DIRECT’ when available.

Pushed as 553c82cee924f0bada27f8209c3bcb28be407953, followed with a NEWS
update.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Jun 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.