Age | Commit message (Collapse) | Author |
|
|
|
testing for quite some time by brad + otto
|
|
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
|
|
|
|
Some parts from NetBSD, but with big modifications.
|
|
the same semantics as NetBSD anyway, so it's good to avoid name collissions.
- Always fdremove before freeing the file, not the other way around.
- falloc FREFs the file.
- have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to
falloc FREFing the file).
- Use closef as much as possible instead of ffree in error paths of
falloc:ing functions. closef is much more careful with the fd and can
deal with the fd being forcibly closed by dup2. Also try to avoid
manually calling *fo_close when closef can do that for us (this makes
some error paths mroe complicated (sys_socketpair and sys_pipe), but
others become simpler (sys_open)).
|
|
from fd tables and other long-lived objects). This is to avoid races between
using a file descriptor and having another process (with shared fd table)
close it. We use a separate refence count so that error values from close(2)
will be correctly returned to the caller of close(2).
The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp).
Make sure that the cases where closef can be called "incorrectly" (most notably
dup2(2)) are handled.
Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly,
more fixes incoming soon.
|
|
|
|
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
|
|
would have to grow the table and fdexpand that grows the table. Since
fdexpand can sleep we have to restart all operations if we have to call
it.
- dup2 changed so that finishdup frees the destination descriptor.
- unp_externalize is a completly rewritten version from NetBSD.
Changes mostly inspired by NetBSD.
|
|
client credentials. mostly from superscript.com. deraadt@ ok
|
|
|
|
names more carefully; art
|
|
|
|
empty for unp_gc() in case of cross referenced sockets. part by millert
|
|
socket, fill the socket's creation time into the stat structure's st_[acm]time
fields: POSIX requires this behavior for pipe(2). N.B.: updating the
st_[am]time fields when reading/writing the pipe is neither required nor
implemented, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|