* dcrt0.cc (dll_crt0_1): Flag that we are working "incyg". Handle any signals
(presumably exiting signals) which may have come in while we are in the process of setting up.
This commit is contained in:
parent
df0f949cfd
commit
3b1a8c572f
|
@ -1,3 +1,9 @@
|
|||
2013-01-21 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||
|
||||
* dcrt0.cc (dll_crt0_1): Flag that we are working "incyg". Handle any
|
||||
signals (presumably exiting signals) which may have come in while we
|
||||
are in the process of setting up.
|
||||
|
||||
2013-01-21 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||
|
||||
* update-copyright: Recognize configure.ac scripts too.
|
||||
|
|
|
@ -820,6 +820,8 @@ dll_crt0_1 (void *)
|
|||
{
|
||||
extern void initial_setlocale ();
|
||||
|
||||
_my_tls.incyg++;
|
||||
|
||||
if (dynamically_loaded)
|
||||
sigproc_init ();
|
||||
|
||||
|
@ -987,7 +989,13 @@ dll_crt0_1 (void *)
|
|||
/* Per POSIX set the default application locale back to "C". */
|
||||
_setlocale_r (_REENT, LC_CTYPE, "C");
|
||||
|
||||
if (user_data->main)
|
||||
if (!user_data->main)
|
||||
{
|
||||
/* Handle any signals which may have arrived */
|
||||
_my_tls.call_signal_handler ();
|
||||
_my_tls.incyg--; /* Not in Cygwin anymore */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Create a copy of Cygwin's version of __argv so that, if the user makes
|
||||
a change to an element of argv[] it does not affect Cygwin's argv.
|
||||
|
@ -998,6 +1006,9 @@ dll_crt0_1 (void *)
|
|||
char **oav = __argv;
|
||||
while ((*nav++ = *oav++) != NULL)
|
||||
continue;
|
||||
/* Handle any signals which may have arrived */
|
||||
_my_tls.call_signal_handler ();
|
||||
_my_tls.incyg--; /* Not in Cygwin anymore */
|
||||
cygwin_exit (user_data->main (__argc, newargv, *user_data->envptr));
|
||||
}
|
||||
__asm__ (" \n\
|
||||
|
|
Loading…
Reference in New Issue