let struct proc allocate 64 chars even on !ILP32 platforms
(don’t fragment memory that much)
This commit is contained in:
parent
929bc9ee9e
commit
c7c8637e63
8
jobs.c
8
jobs.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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
|
#if HAVE_KILLPG
|
||||||
#define mksh_killpg 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 PSIGNALLED 2
|
||||||
#define PSTOPPED 3
|
#define PSTOPPED 3
|
||||||
|
|
||||||
typedef struct proc Proc;
|
typedef struct proc Proc;
|
||||||
struct proc {
|
struct proc {
|
||||||
Proc *next; /* next process in pipeline (if any) */
|
Proc *next; /* next process in pipeline (if any) */
|
||||||
pid_t pid; /* process id */
|
pid_t pid; /* process id */
|
||||||
int state;
|
int state;
|
||||||
int status; /* wait status */
|
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 */
|
/* Notify/print flag - j_print() argument */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user