inotify, faccessat2, fsync for Linux programs, and D-Bus credentials
What installing and starting Epiphany ran into: - inotify: inotify_init/init1, add_watch, rm_watch, as a new kind of event descriptor. The filesystem reports creates, deletes, renames (with a cookie pairing MOVED_FROM and MOVED_TO), writes, close-after-write, truncation and attribute changes, to watches on the inode and on its directory with the name. ONESHOT, MASK_ADD, MASK_CREATE, ONLYDIR, DONT_FOLLOW, IGNORED on removal, Q_OVERFLOW, and Linux's coalescing of repeated events. The hooks cost one load when nothing is watched. Without it GLib found no file monitor and GNOME programs aborted. - FIONREAD on inotify descriptors and pipes (inotifywait sizes its buffer by it). - fsync and fdatasync had no Linux numbers since the first commit: GLib's atomic writes, gtk-update-icon-cache and dbus-uuidgen all got ENOSYS. - faccessat2, the flags-taking faccessat musl uses for any flags. - sendmsg accepts SCM_CREDENTIALS when they are the sender's own, as Linux checks; GDBus sends them in every handshake and was refused with EINVAL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
c77841ce3d
commit
3113eff7fe
9 changed files with 590 additions and 9 deletions
29
include/uapi/inotify.h
Normal file
29
include/uapi/inotify.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// inotify(7) event masks, Linux's values.
|
||||
#ifndef UAPI_INOTIFY_H
|
||||
#define UAPI_INOTIFY_H
|
||||
|
||||
#define IN_ACCESS 0x00000001
|
||||
#define IN_MODIFY 0x00000002
|
||||
#define IN_ATTRIB 0x00000004
|
||||
#define IN_CLOSE_WRITE 0x00000008
|
||||
#define IN_CLOSE_NOWRITE 0x00000010
|
||||
#define IN_OPEN 0x00000020
|
||||
#define IN_MOVED_FROM 0x00000040
|
||||
#define IN_MOVED_TO 0x00000080
|
||||
#define IN_CREATE 0x00000100
|
||||
#define IN_DELETE 0x00000200
|
||||
#define IN_DELETE_SELF 0x00000400
|
||||
#define IN_MOVE_SELF 0x00000800
|
||||
#define IN_ALL_EVENTS 0x00000fff
|
||||
#define IN_UNMOUNT 0x00002000
|
||||
#define IN_Q_OVERFLOW 0x00004000
|
||||
#define IN_IGNORED 0x00008000
|
||||
#define IN_ONLYDIR 0x01000000
|
||||
#define IN_DONT_FOLLOW 0x02000000
|
||||
#define IN_EXCL_UNLINK 0x04000000
|
||||
#define IN_MASK_CREATE 0x10000000
|
||||
#define IN_MASK_ADD 0x20000000
|
||||
#define IN_ISDIR 0x40000000
|
||||
#define IN_ONESHOT 0x80000000
|
||||
|
||||
#endif
|
||||
|
|
@ -354,6 +354,7 @@ struct statfs {
|
|||
#define AT_FDCWD (-100)
|
||||
#define AT_REMOVEDIR 0x200
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100
|
||||
#define AT_EACCESS 0x200
|
||||
#define AT_EMPTY_PATH 0x1000
|
||||
#define AT_NO_AUTOMOUNT 0x800
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue