Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-06-25 01:57:50 +0400
committerChristopher Faylor <me@cgf.cx>2001-06-25 01:57:50 +0400
commit125205875b0b7daf8ab919387924a98b83d918b7 (patch)
tree2e9ea0689cb086c404f69ce8a397210ea8605dc5 /winsup/cygwin/spawn.cc
parent50b1264871afbdcb14a1fd5fae3fe3bc358c0bad (diff)
* exceptions.cc (interrupt_setup): Move actions from setup_handler to here.
(setup_handler): Move actions after a successful interrupt to interrupt_setup. * fork.cc (vfork): Augment debugging output. * sigproc.cc (proc_subproc): Ditto. * spawn.cc (spawn_guts): Ditto. Correctly fill out progname when spawn NO_WAIT. Call signal handler when a signal arrives. * sigproc.h: Declare a function.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index ccf9ed1f6..db2603e30 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -302,7 +302,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
return -1;
}
- syscall_printf ("spawn_guts (%.132s)", prog_arg);
+ syscall_printf ("spawn_guts (%d, %.132s)", mode, prog_arg);
if (argv == NULL)
{
@@ -708,9 +708,9 @@ skip_arg_parsing:
{
/* These are both duplicated in the child code. We do this here,
primarily for strace. */
- strcpy (myself->progname, real_path);
strace.execing = 1;
hExeced = pi.hProcess;
+ strcpy (myself->progname, real_path);
}
else
{
@@ -723,10 +723,10 @@ skip_arg_parsing:
syscall_printf ("-1 = spawnve (), process table full");
return -1;
}
- child->progname[0] = '\0';
child->dwProcessId = pi.dwProcessId;
child->hProcess = pi.hProcess;
child.remember ();
+ strcpy (child->progname, real_path);
/* Start the child running */
ResumeThread (pi.hThread);
}
@@ -761,7 +761,8 @@ skip_arg_parsing:
break;
case WAIT_OBJECT_0 + 1:
sigproc_printf ("signal arrived");
- ResetEvent (signal_arrived);
+ // reset_signal_arrived ();
+ thisframe.call_signal_handler ();
continue;
case WAIT_OBJECT_0 + 2:
if (mode == _P_OVERLAY)
@@ -890,6 +891,7 @@ _spawnve (HANDLE hToken, int mode, const char *path, const char *const *argv,
ret = spawn_guts (hToken, path, argv, envp, mode);
if (vf && ret > 0)
{
+ debug_printf ("longjmping due to vfork");
vf->pid = ret;
longjmp (vf->j, 1);
}