Fixed broken handling of the new file_descriptor::open_count across
team boundaries; if you didn't actually call close() from within the application, the close-hook of the file system was never called. Also, you could close files of other teams (ie. invoke close on a shared file descriptor). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11892 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2004, Axel Dörfler, [email protected].
|
||||
* Copyright 2002-2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _FD_H
|
||||
@@ -68,8 +68,8 @@ extern struct file_descriptor *alloc_fd(void);
|
||||
extern int new_fd_etc(struct io_context *, struct file_descriptor *, int firstIndex);
|
||||
extern int new_fd(struct io_context *, struct file_descriptor *);
|
||||
extern struct file_descriptor *get_fd(struct io_context *, int);
|
||||
extern void put_fd(struct file_descriptor *);
|
||||
extern void free_fd(struct file_descriptor *);
|
||||
extern void close_fd(struct file_descriptor *descriptor);
|
||||
extern void put_fd(struct file_descriptor *descriptor);
|
||||
extern status_t select_fd(int fd, uint8 event, uint32 ref, struct select_sync *sync, bool kernel);
|
||||
extern status_t deselect_fd(int fd, uint8 event, struct select_sync *sync, bool kernel);
|
||||
extern bool fd_is_valid(int fd, bool kernel);
|
||||
|
||||
@@ -58,7 +58,7 @@ status_t vfs_bootstrap_file_systems(void);
|
||||
status_t vfs_mount_boot_file_system(struct kernel_args *args);
|
||||
void vfs_exec_io_context(void *context);
|
||||
void *vfs_new_io_context(void *parentContext);
|
||||
int vfs_free_io_context(void *context);
|
||||
status_t vfs_free_io_context(void *context);
|
||||
|
||||
struct rlimit;
|
||||
int vfs_getrlimit(int resource, struct rlimit * rlp);
|
||||
|
||||
Reference in New Issue
Block a user