Lines Matching refs:sp

57 	register struct sactab *sp;	/* working pointer */  local
59 for (sp = Sactab; sp; sp = sp->sc_next) {
60 if (!strcmp(tag, sp->sc_tag))
61 return(sp);
81 register struct sactab *sp; /* working pointer */ in sigpoll() local
114 if ((sp = findpm(ap->ac_tag)) == NULL) { in sigpoll()
121 switch (sp->sc_sstate) { in sigpoll()
130 sp->sc_rscnt = 0; /* fresh start in life */ in sigpoll()
131 if (ret = startpm(sp)) { in sigpoll()
167 if ((sp = findpm(ap->ac_tag)) == NULL) { in sigpoll()
174 switch (sp->sc_sstate) { in sigpoll()
197 if (sendsig(sp, SIGTERM)) { in sigpoll()
198 (void) sprintf(Scratch, "could not send SIGTERM to <%s>", sp->sc_tag); in sigpoll()
208 sp->sc_lstate = NOTRUNNING; in sigpoll()
209 sp->sc_sstate = NOTRUNNING; in sigpoll()
210 sp->sc_pstate = STOPPING; in sigpoll()
215 (void) sprintf(Scratch, "terminating <%s>", sp->sc_tag); in sigpoll()
231 if ((sp = findpm(ap->ac_tag)) == NULL) { in sigpoll()
238 switch (sp->sc_sstate) { in sigpoll()
257 sp->sc_sstate = ENABLED; in sigpoll()
258 sp->sc_lstate = ENABLED; in sigpoll()
259 sendpmmsg(sp, &sacmsg); in sigpoll()
283 if ((sp = findpm(ap->ac_tag)) == NULL) { in sigpoll()
290 switch (sp->sc_sstate) { in sigpoll()
309 sp->sc_sstate = DISABLED; in sigpoll()
310 sp->sc_lstate = DISABLED; in sigpoll()
311 sendpmmsg(sp, &sacmsg); in sigpoll()
409 if ((sp = findpm(ap->ac_tag)) == NULL) { in sigpoll()
416 switch (sp->sc_sstate) { in sigpoll()
436 sendpmmsg(sp, &sacmsg); in sigpoll()
492 sendpmmsg(sp, sm) in sendpmmsg() argument
493 register struct sactab *sp; in sendpmmsg()
501 if (write(sp->sc_fd, sm, sizeof(struct sacmsg)) != sizeof(struct sacmsg)) {
502 (void) sprintf(buf, "message to <%s> failed", sp->sc_tag);
516 sendsig(struct sactab *sp, int signo) in sendsig() argument
522 (void) sprintf(Scratch, "in sendsig - sending signo %d to %s", signo, sp->sc_tag); in sendsig()
525 if (pid = checklock(sp)) { in sendsig()
553 checklock(sp) in checklock() argument
554 register struct sactab *sp; in checklock()
563 (void) sprintf(Scratch, "%s/%s/_pid", HOME, sp->sc_tag);
566 (void) sprintf(Scratch, "can not open _pid file for <%s>", sp->sc_tag);