From c7c8637e63dd8f7ba8b18496d41839f5992ee49b Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 6 Feb 2012 17:49:52 +0000 Subject: [PATCH] =?UTF-8?q?let=20struct=20proc=20allocate=2064=20chars=20e?= =?UTF-8?q?ven=20on=20!ILP32=20platforms=20(don=E2=80=99t=20fragment=20mem?= =?UTF-8?q?ory=20that=20much)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jobs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jobs.c b/jobs.c index 4f4e9ee..bb38997 100644 --- a/jobs.c +++ b/jobs.c @@ -22,7 +22,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.83 2012/02/06 17:42:23 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.84 2012/02/06 17:49:52 tg Exp $"); #if HAVE_KILLPG #define mksh_killpg killpg @@ -37,13 +37,15 @@ __RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.83 2012/02/06 17:42:23 tg Exp $"); #define PSIGNALLED 2 #define PSTOPPED 3 -typedef struct proc Proc; +typedef struct proc Proc; struct proc { Proc *next; /* next process in pipeline (if any) */ pid_t pid; /* process id */ int state; int status; /* wait status */ - char command[44]; /* process command string */ + /* process command string from vistree */ + char command[64 - (ALLOC_SIZE + sizeof(Proc *) + sizeof(pid_t) + + 2 * sizeof(int))]; }; /* Notify/print flag - j_print() argument */