set.
* exceptions.cc (sig_handle_tty_stop): Don't reset sigCONT event since it is
reset automatically.
* fork.cc (fork): Remove obsolete usage of PID_SPLIT_HEAP.
* include/sys/cygwin.h: Ditto.
* sigproc.cc (sig_send): Use sigframe init method to set frame since it checks
for previous ownership of the frame.
* sigproc.h (sigframe::init): Accept an "is_exception" argument.
2003-09-08 Christopher Faylor <cgf@redhat.com>
+ * dcrt0.cc (dlL_crt0_1): Set __argc_safe after __argc is absolutely
+ know to be set.
+ * exceptions.cc (sig_handle_tty_stop): Don't reset sigCONT event since
+ it is reset automatically.
+ * fork.cc (fork): Remove obsolete usage of PID_SPLIT_HEAP.
+ * include/sys/cygwin.h: Ditto.
+ * sigproc.cc (sig_send): Use sigframe init method to set frame since it
+ checks for previous ownership of the frame.
+ * sigproc.h (sigframe::init): Accept an "is_exception" argument.
+
+2003-09-08 Christopher Faylor <cgf@redhat.com>
+
* dir.cc (readdir): Reinstate setting of old ino field for legacy
applications.
* dirent.h (dirent): Rename unused field to __ino32.
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
h = NULL;
set_myself (mypid, h);
- __argc = __argc_safe = spawn_info->moreinfo->argc;
+ __argc = spawn_info->moreinfo->argc;
__argv = spawn_info->moreinfo->argv;
envp = spawn_info->moreinfo->envp;
envc = spawn_info->moreinfo->envc;
}
}
+ __argc_safe = __argc;
if (user_data->premain[0])
for (unsigned int i = 0; i < PREMAIN_LEN / 2; i++)
user_data->premain[i] (__argc, __argv, user_data);
myself->pid, sig, myself->ppid_handle);
if (WaitForSingleObject (sigCONT, INFINITE) != WAIT_OBJECT_0)
api_fatal ("WaitSingleObject failed, %E");
- (void) ResetEvent (sigCONT);
return;
}
}
goto dosig;
- stop:
+stop:
/* Eat multiple attempts to STOP */
if (ISSTATE (myself, PID_STOPPED))
goto done;
handler = (void *) sig_handle_tty_stop;
thissig = myself->getsig (SIGSTOP);
- dosig:
+dosig:
/* Dispatch to the appropriate function. */
sigproc_printf ("signal %d, about to call %p", sig, handler);
rc = setup_handler (sig, handler, thissig);
- done:
+done:
sigproc_printf ("returning %d", rc);
return rc;
- exit_sig:
+exit_sig:
if (sig == SIGQUIT || sig == SIGABRT)
{
CONTEXT c;
buflen = (size_t) -1;
return;
- sig_exit:
+sig_exit:
set_sig_errno (EINTR);
buflen = (size_t) -1;
return;
grouped.hParent = grouped.first_dll = NULL;
grouped.load_dlls = 0;
- if (ISSTATE(myself, PID_SPLIT_HEAP))
- {
- system_printf ("The heap has been split, CYGWIN can't fork this process.");
- system_printf ("Increase the heap_chunk_size in the registry and try again.");
- set_errno (ENOMEM);
- syscall_printf ("-1 = fork (), split heap");
- return -1;
- }
-
void *esp;
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
PID_ORPHANED = 0x0020, /* Member of an orphaned process group. */
PID_ACTIVE = 0x0040, /* Pid accepts signals. */
PID_CYGPARENT = 0x0080, /* Set if parent was a cygwin app. */
- PID_SPLIT_HEAP = 0x0100, /* Set if the heap has been split, */
- /* which means we can't fork again. */
+ PID_UNUSED = 0x0100, /* ... */
PID_MYSELF = 0x0200, /* Flag that pid is me. */
PID_NOCLDSTOP = 0x0400, /* Set if no SIGCHLD signal on stop. */
PID_INITIALIZING = 0x0800, /* Set until ready to receive signals. */
{
thiscatch = sigcatch_main;
thiscomplete = sigcomplete_main;
- thisframe.set (mainthread, ebp, exception);
+ thisframe.init (mainthread, ebp, exception);
todo = getlocal_sigtodo (sig);
issem = true;
}
if (!oframe)
t.get_winapi_lock ();
}
- inline void init (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0))
+ inline void init (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0), bool is_exception = 0)
{
- if (!t.frame && t.id == GetCurrentThreadId ())
- set (t, ebp);
+ if (is_exception || (!t.frame && t.id == GetCurrentThreadId ()))
+ set (t, ebp, is_exception);
else
st = NULL;
}