Lines Matching refs:trap
2 /* $OpenBSD: trap.c,v 1.23 2010/05/19 17:36:08 jasper Exp $ */
1120 sigtraps[ksh_SIGEXIT].mess = "Exit trap";
1226 * trap signal handler
1234 trap = p->set = 1;
1237 if ((p->flags & TF_FATAL) && !p->trap) {
1279 * occurred for which a trap has been set or for which the TF_DFL_INTR flag
1289 if (p->set && ((p->trap && p->trap[0]) ||
1290 ((p->flags & (TF_DFL_INTR|TF_FATAL)) && !p->trap)))
1313 * XXX: this means the alarm will have no effect if a trap
1318 trap = 0;
1326 ((p->flags & flag) && p->trap == NULL)))
1344 trapstr = p->trap;
1368 p->trap = NULL;
1374 * no problem with afree(p->trap) in settrap() while still in use.
1382 p->trap = trapstr;
1387 /* we're the last trap of a sequence executed */
1394 /* clear pending traps and reset user's trap handlers; used after fork(2) */
1401 trap = 0;
1407 if ((p->flags & TF_USER_SET) && (p->trap && p->trap[0]))
1433 afree(p->trap, APERM);
1435 strdupx(p->trap, s, APERM);