* cygheap.h (struct cwdstuff): Add "sync" member and accompanying

"keep_in_sync" methods.
	* external.cc (cygwin_internal): Call above keep_in_sync method when
	CW_SYNC_WINENV is requested.
	* path.cc (cwdstuff::init): Don't change to windows_system_directory
	if keep_in_sync is requested.
	(cwdstuff::keep_in_sync): New method.
	(cwdstuff::set): Take sync flag into account.
This commit is contained in:
Corinna Vinschen
2006-12-07 10:04:52 +00:00
parent 63f33caadc
commit 2ffc166d07
4 changed files with 71 additions and 33 deletions

View File

@@ -230,6 +230,7 @@ struct cwdstuff
char *win32;
DWORD hash;
DWORD drive_length;
bool sync;
static muto cwd_lock;
char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
DWORD get_hash ();
@@ -244,6 +245,8 @@ struct cwdstuff
void fixup_after_exec (char *, char *, DWORD);
bool get_initial ();
int set (const char *, const char *, bool);
bool keep_in_sync () const { return sync; }
void keep_in_sync (bool val);
};
#ifdef DEBUGGING