* dtable.cc (dtable::build_fhandler_from_name): Use PC_FULL to determine path

name.
* fork.cc (fork_parent): Correct the "unable to allocate forker_finished event"
error message.  It named the wrong event before.
This commit is contained in:
Christopher Faylor 2001-10-14 15:49:13 +00:00
parent 611d92e24c
commit 48372ea6f1
4 changed files with 12 additions and 18 deletions

View File

@ -1,3 +1,13 @@
2001-10-14 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::build_fhandler_from_name): Use PC_FULL to
determine path name.
Sun Oct 14 08:10:12 2001 Gary R. Van Sickle
* fork.cc (fork_parent): Correct the "unable to allocate
forker_finished event" error message. It named the wrong event before.
2001-10-13 Christopher Faylor <cgf@redhat.com>
* autoload.cc (load_wsock32): Declare dummy function to force loading

View File

@ -244,7 +244,7 @@ fhandler_base *
dtable::build_fhandler_from_name (int fd, const char *name, HANDLE handle,
path_conv& pc, unsigned opt, suffix_info *si)
{
pc.check (name, opt | PC_NULLEMPTY, si);
pc.check (name, opt | PC_NULLEMPTY | PC_FULL, si);
if (pc.error)
{
set_errno (pc.error);

View File

@ -422,7 +422,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
{
CloseHandle (hParent);
CloseHandle (subproc_ready);
system_printf ("unable to allocate subproc_ready event, %E");
system_printf ("unable to allocate forker_finished event, %E");
return -1;
}

View File

@ -3146,22 +3146,6 @@ fchdir (int fd)
}
SetResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "fchdir");
int ret = chdir (cygheap->fdtab[fd]->get_name ());
if (ret == 0)
{
/* The name in the fhandler is explicitely overwritten with the full path.
Otherwise fchmod() to a path originally given as a relative path could
end up in a completely different directory. Imagine:
fd = open ("..");
fchmod(fd);
fchmod(fd);
The 2nd fchmod should chdir to the same dir as the first call, not
to it's parent dir. */
char posix_path[MAX_PATH];
cygheap->fdtab.reset_unix_path_name (fd, cygheap->cwd.get (posix_path, 1, 1));
}
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "fchdir");
syscall_printf ("%d = fchdir (%d)", ret, fd);
return ret;