[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MiNT 1.11 BETA
- dos.c: fix a typo in Sysconf
--- orig/dos.c Mon Aug 8 08:17:54 1994
+++ dos.c Mon Aug 15 21:32:46 1994
@@ -728,7 +728,7 @@
case 2:
return MAX_OPEN;
case 3:
- return 0;
+ return NGROUPS_MAX;
case 4:
return UNLIMITED;
default:
----------------------------------------------------------------------
- quickmov.spp: add memcpy alias for gcc >= 2.5.8, which uses this
instead of the obsolete bcopy
--- orig/quickmov.spp Mon Aug 8 07:18:52 1994
+++ quickmov.spp Tue Aug 9 23:41:16 1994
@@ -14,19 +14,20 @@
XDEF _quickmove
XDEF _quickmovb
-;*sigh* gcc 2.5.8 wants the libs one...
-%ifdef XDEF_BCOPY
;%ifdef OWN_LIB
XDEF _bcopy
XDEF __bcopy
+ XDEF _memcpy
_bcopy:
__bcopy:
move.l 8(sp),a0 ; get dst
move.l 4(sp),a1 ; get src
bra.s _quickmovb1
+
+; for gcc >= 2.5.8
+_memcpy:
;%endif
-%endif
_quickmovb:
move.l 4(sp),a0 ; get dst
----------------------------------------------------------------------
- dosdir.c: don't follow links in Fchown (Un*x systems that follow
links in chown nomally provide lchown for symlinks)
--- orig/dosdir.c Sun Aug 7 03:05:42 1994
+++ dosdir.c Tue Aug 9 21:43:26 1994
@@ -1227,7 +1227,7 @@
TRACE(("Fchown(%s, %d, %d)", name, uid, gid));
- r = path2cookie(name, follow_links, &fc);
+ r = path2cookie(name, NULL, &fc);
if (r) {
DEBUG(("Fchown(%s): error %ld", name, r));
return r;
----------------------------------------------------------------------
- procfs.c: discard the saved interrupt frame when restarting with
PTRACEGO, etc., so that the 68030 doesn't try to restart after a bus
error.
- signal.c: always pass the signal to the tracer even if it is blocked
or ignored in the traced process.
--- orig/procfs.c Mon Aug 8 07:10:58 1994
+++ procfs.c Tue Aug 9 22:56:24 1994
@@ -657,6 +657,8 @@
}
p->ctxt[SYSCALL].sr &= 0x3fff; /* clear both trace bits */
p->ctxt[SYSCALL].sr |= (mode - PTRACEGO) << 14;
+ /* Discard the saved frame */
+ p->ctxt[SYSCALL].sfmt = 0;
p->sigpending = 0;
if (buf && *(ushort *)buf != 0) {
TRACE(("PTRACEGO: sending signal %d to pid %d", *(ushort *)buf, p->pid));
--- orig/signal.c Fri Jul 1 06:11:14 1994
+++ signal.c Mon Aug 15 20:24:38 1994
@@ -59,7 +59,8 @@
* signal 0 internally for some purposes, but it is handled
* specially (see supexec() in xbios.c, for example).
*/
- if (p->sighandle[sig] == SIG_IGN || sig == 0)
+/* If the process is traced, the tracer should always be notified. */
+ if (sig == 0 || (p->sighandle[sig] == SIG_IGN && !p->ptracer))
return;
/* if the process is already dead, do nothing */
@@ -141,7 +142,10 @@
if (curproc->pid == 0) return;
top:
- sigs = curproc->sigpending & ~(curproc->sigmask);
+ sigs = curproc->sigpending;
+ /* Always notify the tracer about signals sent. */
+ if (!curproc->ptracer || curproc->sigpending & 1L)
+ sigs &= ~(curproc->sigmask);
if (sigs) {
sigm = 2;
/* with tracing we need a mechanism to allow a signal to be delivered
@@ -156,7 +160,7 @@
if (sigs & sigm) {
curproc->sigpending &= ~sigm;
if (curproc->ptracer && !deliversig &&
- i != SIGCONT) {
+ i != SIGCONT && i != SIGKILL) {
TRACE(("tracer being notified of signal %d", i));
stop(i);
/* the parent may reset our pending signals, so check again */
@@ -575,12 +579,11 @@
oldmask = curproc->sigmask;
- if ((1L << sig) & STOPSIGS) {
+ if (!curproc->ptracer) {
+ assert((1L << sig) & STOPSIGS);
/* mask out most signals */
curproc->sigmask |= ~(UNMASKABLE | SIGTERM);
}
- else
- assert(curproc->ptracer);
/* sleep until someone signals us awake */
sleep(STOP_Q, (long) code | 0177);
----------------------------------------------------------------------
- signal.c: implement sigcontext, passed as third argument to signal
handler, which can modify it.
--- orig/signal.c Fri Jul 1 06:11:14 1994
+++ signal.c Mon Aug 15 20:24:38 1994
@@ -298,12 +298,20 @@
static long unwound_stack = 0;
+struct sigcontext
+{
+ unsigned long sc_pc;
+ unsigned long sc_usp;
+ unsigned short sc_sr;
+};
+
void
handle_sig(sig)
int sig;
{
long oldstack, newstack;
long *stack;
+ struct sigcontext *sigctxt;
CONTEXT *call, contexts[2];
#define newcurrent (contexts[0])
#define oldsysctxt (contexts[1])
@@ -440,6 +448,12 @@
* single SIGFPE handler (for example) can discriminate amongst the
* multiple things which may get thrown its way
*/
+ stack -= 3;
+ sigctxt = (struct sigcontext *) stack;
+ sigctxt->sc_pc = oldsysctxt.pc;
+ sigctxt->sc_usp = oldsysctxt.usp;
+ sigctxt->sc_sr = oldsysctxt.sr;
+ *(--stack) = (long)sigctxt;
*(--stack) = (long)call->sfmt & 0xfff;
*(--stack) = (long)sig;
*(--stack) = (long)sig_return;
@@ -480,7 +494,11 @@
* and continue with whatever it was we were doing.
*/
TRACE(("done handling signal"));
+ oldsysctxt.pc = sigctxt->sc_pc;
+ oldsysctxt.usp = sigctxt->sc_usp;
+ oldsysctxt.sr &= 0xff00;
+ oldsysctxt.sr |= sigctxt->sc_sr & 0xff;
curproc->ctxt[SYSCALL] = oldsysctxt;
assert(curproc->magic == CTXT_MAGIC);
}