NetBSD-Bugs archive

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

PR/60275 CVS commit: src/bin/sh



The following reply was made to PR bin/60275; it has been noted by GNATS.

From: "Robert Elz" <kre%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/60275 CVS commit: src/bin/sh
Date: Fri, 22 May 2026 01:01:55 +0000

 Module Name:	src
 Committed By:	kre
 Date:		Fri May 22 01:01:55 UTC 2026
 
 Modified Files:
 	src/bin/sh: trap.c
 
 Log Message:
 PR bin/60275  one more (should be the last) correction
 
 It wasn't possible to do this, previously, but after the 3rd
 in the sequence, we can (it should have been included with that one).
 
 Never even look at gotsig[signo] in a vforked child - it will
 be reflecting the state of the parent, not the child, so has
 nothing to do with the child (this wasn't true until after the
 3rd fix, which made sure that the child after a vfork doesn't
 step on the parent's memory).
 
 This will fix an unbelievably unlikely situation, where a
 trapped signal arrives at the parent immediately before it
 vforks() a child, which happens before the trap is executed.
 
 Depending upon which of the various fixes (or none of them)
 to this PR have been included various incorrect things might
 have happened - the child might have processed the signal
 trap instead of the parent, the signal might be lost, or even
 processed twice....   Now the signal will be left for the
 parent to process.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.61 -r1.62 src/bin/sh/trap.c
 
 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