Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Mon Dec  3 02:38:30 UTC 2018

Modified Files:
        src/bin/sh: jobs.c main.c main.h

Log Message:
When forking a child shell, arrange for errors/exit to always unwind
to the main handler, rather than wherever the parent shell would go.

nb: not needed for vfork(), after vfork() we never go that path - which
is good or we'd be corrupting the parent's handler.

This allows the child to always exit (when it should) rather than being
caught up doing something else (and while it would eventually exit, the
status would be incorrect in some cases).

One test is:
        sh -c 'trap "(! :) && echo BUG || echo nobug" EXIT'
from Martijn Dekker

Fix from FreeBSD (missed earlier).

XXX - 2b part of the 48875 pullup to -8


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/bin/sh/jobs.c
cvs rdiff -u -r1.76 -r1.77 src/bin/sh/main.c
cvs rdiff -u -r1.11 -r1.12 src/bin/sh/main.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index