Imported from ../bash-2.01.1.tar.gz.
This commit is contained in:
parent
d166f04881
commit
e8ce775db8
50 changed files with 2170 additions and 1502 deletions
|
@ -191,7 +191,7 @@ static void
|
|||
showtrap (i)
|
||||
int i;
|
||||
{
|
||||
char *t, *p;
|
||||
char *t, *p, *sn;
|
||||
|
||||
p = trap_list[i];
|
||||
|
||||
|
@ -199,9 +199,15 @@ showtrap (i)
|
|||
return;
|
||||
|
||||
t = (p == (char *)IGNORE_SIG) ? (char *)NULL : single_quote (p);
|
||||
printf ("trap -- %s %s\n", t ? t : "''", signal_name (i));
|
||||
if (t)
|
||||
free (t);
|
||||
sn = signal_name (i);
|
||||
/* Make sure that signals whose names are unknown (for whatever reason)
|
||||
are printed as signal numbers. */
|
||||
if (STREQN (sn, "SIGJUNK", 7) || STREQN (sn, "unknown", 7))
|
||||
printf ("trap -- %s %d\n", t ? t : "''", i);
|
||||
else
|
||||
printf ("trap -- %s %s\n", t ? t : "''", sn);
|
||||
|
||||
FREE (t);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue