aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-03-02 19:38:20 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-03-02 19:38:20 +0000
commitd66a506616078adf4d266a309f979ffd95fe634f (patch)
tree83b4d342a731e2a76c19f214d574f24753abe420 /sys/kern/kern_exec.c
parent9a074e93b595e10edfd4c6fd6bdacc61879fe381 (diff)
downloadsrc-d66a506616078adf4d266a309f979ffd95fe634f.tar.gz
src-d66a506616078adf4d266a309f979ffd95fe634f.zip
Notes
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 9933183aff40..65fdaff03ad1 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.34 1996/01/20 21:36:30 bde Exp $
+ * $Id: kern_exec.c,v 1.35 1996/02/24 14:32:52 peter Exp $
*/
#include <sys/param.h>
@@ -456,15 +456,25 @@ exec_copyout_strings(imgp)
char *stringp, *destp;
int *stack_base;
struct ps_strings *arginfo;
+ int szsigcode;
/*
* Calculate string base and vector table pointers.
+ * Also deal with signal trampoline code for this exec type.
*/
arginfo = PS_STRINGS;
- destp = (caddr_t)arginfo - SPARE_USRSPACE -
+ szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
+ destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE -
roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
/*
+ * install sigcode
+ */
+ if (szsigcode)
+ copyout(imgp->proc->p_sysent->sv_sigcode,
+ ((caddr_t)arginfo - szsigcode), szsigcode);
+
+ /*
* The '+ 2' is for the null pointers at the end of each of the
* arg and env vector sets
*/