* dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before handling
exec/fork. * dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead buffer whether closing or adjusting. * path.cc (chdir): Avoid a compiler warning.
This commit is contained in:
parent
4497c0df52
commit
4f7ac76aae
@ -1,3 +1,11 @@
|
|||||||
|
Sun Sep 10 12:40:49 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before
|
||||||
|
handling exec/fork.
|
||||||
|
* dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead
|
||||||
|
buffer whether closing or adjusting.
|
||||||
|
* path.cc (chdir): Avoid a compiler warning.
|
||||||
|
|
||||||
Sat Sep 9 23:29:17 2000 Christopher Faylor <cgf@cygnus.com>
|
Sat Sep 9 23:29:17 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* path.cc (chdir): Use the full path for cwd_win32. Consider attempts
|
* path.cc (chdir): Use the full path for cwd_win32. Consider attempts
|
||||||
|
@ -644,6 +644,10 @@ dll_crt0_1 ()
|
|||||||
|
|
||||||
user_data->resourcelocks->Init ();
|
user_data->resourcelocks->Init ();
|
||||||
user_data->threadinterface->Init0 ();
|
user_data->threadinterface->Init0 ();
|
||||||
|
|
||||||
|
threadname_init ();
|
||||||
|
debug_init ();
|
||||||
|
|
||||||
regthread ("main", GetCurrentThreadId ());
|
regthread ("main", GetCurrentThreadId ());
|
||||||
|
|
||||||
char **envp = NULL;
|
char **envp = NULL;
|
||||||
@ -713,9 +717,6 @@ dll_crt0_1 ()
|
|||||||
/* Initialize events. */
|
/* Initialize events. */
|
||||||
events_init ();
|
events_init ();
|
||||||
|
|
||||||
threadname_init ();
|
|
||||||
debug_init ();
|
|
||||||
|
|
||||||
/* Allow backup semantics. It's better done only once on process start
|
/* Allow backup semantics. It's better done only once on process start
|
||||||
instead of each time a file is opened. */
|
instead of each time a file is opened. */
|
||||||
set_process_privileges ();
|
set_process_privileges ();
|
||||||
|
@ -445,13 +445,13 @@ dtable::fixup_after_exec (HANDLE parent, size_t sz, fhandler_base **f)
|
|||||||
first_fd_for_open = 0;
|
first_fd_for_open = 0;
|
||||||
for (size_t i = 0; i < size; i++)
|
for (size_t i = 0; i < size; i++)
|
||||||
if (fds[i])
|
if (fds[i])
|
||||||
if (fds[i]->get_close_on_exec ())
|
{
|
||||||
release (i);
|
fds[i]->clear_readahead ();
|
||||||
else
|
if (fds[i]->get_close_on_exec ())
|
||||||
{
|
release (i);
|
||||||
fds[i]->clear_readahead ();
|
else
|
||||||
fds[i]->fixup_after_exec (parent);
|
fds[i]->fixup_after_exec (parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2507,7 +2507,7 @@ chdir (const char *dir)
|
|||||||
else
|
else
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
int len = strlen (p);
|
size_t len = strlen (p);
|
||||||
if (len > 2 && strspn (p, ".") == len)
|
if (len > 2 && strspn (p, ".") == len)
|
||||||
{
|
{
|
||||||
set_errno (ENOENT);
|
set_errno (ENOENT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user