Lines Matching refs:Trap
2 /* $OpenBSD: trap.c,v 1.23 2010/05/19 17:36:08 jasper Exp $ */
32 Trap sigtraps[NSIG + 1];
1075 Trap *
1079 Trap *p;
1118 * trap signal handler
1123 Trap *p = &sigtraps[i];
1126 trap = p->set = 1;
1129 if ((p->flags & TF_FATAL) && !p->trap) {
1157 Trap *p;
1169 * occurred for which a trap has been set or for which the TF_DFL_INTR flag
1176 Trap *p;
1179 if (p->set && ((p->trap && p->trap[0]) ||
1180 ((p->flags & (TF_DFL_INTR|TF_FATAL)) && !p->trap)))
1193 Trap *p;
1201 * XXX: this means the alarm will have no effect if a trap
1206 trap = 0;
1214 ((p->flags & flag) && p->trap == NULL)))
1221 runtrap(Trap *p, bool is_last)
1230 trapstr = p->trap;
1253 p->trap = NULL;
1259 * no problem with afree(p->trap) in settrap() while still in use.
1267 p->trap = trapstr;
1272 /* we're the last trap of a sequence executed */
1279 /* clear pending traps and reset user's trap handlers; used after fork(2) */
1284 Trap *p;
1286 trap = 0;
1291 if ((p->flags & TF_USER_SET) && (p->trap && p->trap[0]))
1301 Trap *p;
1310 settrap(Trap *p, const char *s)
1314 if (p->trap)
1315 afree(p->trap, APERM);
1317 strdupx(p->trap, s, APERM);
1353 Trap *p = &sigtraps[SIGPIPE];
1380 setsig(Trap *p, sig_t f, int flags)
1438 setexecsig(Trap *p, int restore)