summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
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 9933183..65fdaff 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
*/
OpenPOWER on IntegriCloud