diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 88bf7e85e..3b859ce8c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +Wed Oct 18 20:50:27 2000 Christopher Faylor + + * sigproc.h (sigthread): Eliminate locking for now since per thread + signalling is not available. + * dcrt0.cc (sigthread::init): Ditto. + (dll_crt0_1): Move set_process_privileges call (temporarily?) to + pinfo_init. + (pinfo_init): Only call set_process_privileges when allow_ntsec. + 2000-10-18 DJ Delorie * dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index fa13cf1ce..fbf794721 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -614,8 +614,10 @@ char _declspec(dllexport) **__argv = NULL; void sigthread::init (const char *s) { +#if 0 /* FIXME: Someday we'll need this for inter-thread signalling */ lock = new_muto (FALSE, s); id = GetCurrentThreadId (); +#endif } /* Take over from libc's crt0.o and start the application. Note the @@ -735,10 +737,6 @@ dll_crt0_1 () /* Initialize events. */ events_init (); - /* Allow backup semantics. It's better done only once on process start - instead of each time a file is opened. */ - set_process_privileges (); - cygcwd.init (); cygbench ("pre-forkee"); diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 21aa0fb8d..ce1ebe52f 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -109,6 +109,11 @@ pinfo_init (char **envp, int envc) environ_init (NULL, 0); /* call after myself has been set up */ } + /* Allow backup semantics. It's better done only once on process start + instead of each time a file is opened. */ + if (allow_ntsec) + set_process_privileges (); + debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid); } diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index 1a79cffc5..2ee39b013 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -38,7 +38,7 @@ struct sigthread { DWORD id; DWORD frame; - muto *lock; + muto *lock; // FIXME: Use for multi-thread signalling someday void init (const char *s); }; @@ -50,10 +50,8 @@ private: public: void set (sigthread &t, DWORD ebp) { - t.lock->acquire (); st = &t; t.frame = ebp; - t.lock->release (); } sigframe () {st = NULL;} @@ -68,9 +66,7 @@ public: { if (st) { - st->lock->acquire (); st->frame = 0; - st->lock->release (); st = NULL; } }