version 1.49, 2003/06/03 02:56:11 |
version 1.50, 2004/04/07 13:11:35 |
|
|
static volatile sig_atomic_t interrupted; |
static volatile sig_atomic_t interrupted; |
|
|
static void |
static void |
CompatInterrupt(signo) |
CompatInterrupt(int signo) |
int signo; |
|
{ |
{ |
if (interrupted != SIGINT) |
if (interrupted != SIGINT) |
interrupted = signo; |
interrupted = signo; |
|
|
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
*/ |
*/ |
static int |
static int |
shellneed(av) |
shellneed(char **av) |
char **av; |
|
{ |
{ |
char *runsh[] = { |
char *runsh[] = { |
"alias", "cd", "eval", "exec", "exit", "read", "set", "ulimit", |
"alias", "cd", "eval", "exec", "exit", "read", "set", "ulimit", |
|
|
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
*/ |
*/ |
static int |
static int |
CompatRunCommand(cmdp, gnp) |
CompatRunCommand(void *cmdp, /* Command to execute */ |
void * cmdp; /* Command to execute */ |
void *gnp) /* Node from which the command came */ |
void * gnp; /* Node from which the command came */ |
|
{ |
{ |
char *cmdStart; /* Start of expanded command */ |
char *cmdStart; /* Start of expanded command */ |
char *cp, *bp = NULL; |
char *cp, *bp = NULL; |
|
|
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
*/ |
*/ |
static void |
static void |
CompatMake(gnp, pgnp) |
CompatMake(void *gnp, /* The node to make */ |
void * gnp; /* The node to make */ |
void *pgnp) /* Parent to abort if necessary */ |
void * pgnp; /* Parent to abort if necessary */ |
|
{ |
{ |
GNode *gn = (GNode *)gnp; |
GNode *gn = (GNode *)gnp; |
GNode *pgn = (GNode *)pgnp; |
GNode *pgn = (GNode *)pgnp; |
|
|
} |
} |
|
|
void |
void |
Compat_Run(targs) |
Compat_Run(Lst targs) /* List of target nodes to re-create */ |
Lst targs; /* List of target nodes to re-create */ |
|
{ |
{ |
char *cp; /* Pointer to string of shell meta-characters */ |
char *cp; /* Pointer to string of shell meta-characters */ |
GNode *gn = NULL;/* Current root target */ |
GNode *gn = NULL; /* Current root target */ |
int errors; /* Number of targets not remade due to errors */ |
int errors; /* Number of targets not remade due to errors */ |
|
|
signal(SIGINT, CompatInterrupt); |
signal(SIGINT, CompatInterrupt); |
signal(SIGTERM, CompatInterrupt); |
signal(SIGTERM, CompatInterrupt); |