int open (int flags, mode_t mode = 0);
int close ();
+ int fcntl (int cmd, intptr_t);
int __reg2 fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t newmode);
int
fhandler_socket_local::dup (fhandler_base *child, int flags)
{
+ if (get_flags () & O_PATH)
+ /* We're viewing the socket as a disk file, but fhandler_base::dup
+ suffices here. */
+ return fhandler_base::dup (child, flags);
+
fhandler_socket_local *fhs = (fhandler_socket_local *) child;
fhs->set_sun_path (get_sun_path ());
fhs->set_peer_sun_path (get_peer_sun_path ());
return fhandler_socket_wsock::close ();
}
+int
+fhandler_socket_local::fcntl (int cmd, intptr_t arg)
+{
+ if (get_flags () & O_PATH)
+ /* We're viewing the socket as a disk file, but
+ fhandler_base::fcntl suffices here. */
+ return fhandler_base::fcntl (cmd, arg);
+ else
+ return fhandler_socket_wsock::fcntl (cmd, arg);
+}
+
int __reg2
fhandler_socket_local::fstat (struct stat *buf)
{