Lines Matching refs:sp

58 	struct sactab *sp;	/* working pointer to move through PM info */  local
83 for (sp = Sactab; sp; sp = sp->sc_next)
84 sp->sc_valid = 0;
90 while (sp = read_entry(fp))
91 insert(sp, startflag);
107 register struct sactab *sp; /* working pointer */ local
126 sp = (struct sactab *) calloc(1, sizeof(struct sactab));
127 if (sp == NULL)
129 sp->sc_sstate = sp->sc_lstate = sp->sc_pstate = NOTRUNNING;
130 (void) memset(sp->sc_utid, '\0', IDLEN);
131 parse(p, sp);
132 return(sp);
145 insert(sp, startflag) in insert() argument
146 register struct sactab *sp; in insert()
162 ret = strcmp(sp->sc_tag, tsp->sc_tag);
164 …(void) sprintf(Scratch, "sp->sc_tag <%s> tsp->sc_tag <%s>, ret is %d", sp->sc_tag, tsp->sc_tag, re…
187 tsp->sc_rsmax = sp->sc_rsmax;
188 tsp->sc_flags = sp->sc_flags;
190 (void) sprintf(Scratch, "replacing <%s>", sp->sc_tag);
197 free(sp->sc_cmd);
198 free(sp);
204 sp->sc_next = Sactab;
205 Sactab = sp;
208 sp->sc_next = savtsp->sc_next;
209 savtsp->sc_next = sp;
212 (void) sprintf(Scratch, "adding <%s>", sp->sc_tag);
217 sp->sc_valid = 1;
218 if (startflag && !(sp->sc_flags & X_FLAG))
219 (void) startpm(sp);
228 sp->sc_next = NULL;
230 Sactab = sp;
232 savtsp->sc_next = sp;
234 (void) sprintf(Scratch, "adding <%s>", sp->sc_tag);
239 sp->sc_valid = 1;
240 if (startflag && !(sp->sc_flags & X_FLAG))
241 (void) startpm(sp);
254 register struct sactab *sp; /* working pointer */ in purge() local
264 sp = savesp = Sactab; in purge()
265 while (sp) { in purge()
266 if (sp->sc_valid) { in purge()
267 savesp = sp; in purge()
268 sp = sp->sc_next; in purge()
273 switch (sp->sc_sstate) { in purge()
283 if (sendsig(sp, SIGTERM)) in purge()
284 (void) sprintf(Scratch, "could not send SIGTERM to <%s>", sp->sc_tag); in purge()
286 (void) sprintf(Scratch, "terminating <%s>", sp->sc_tag); in purge()
292 (void) close(sp->sc_fd); in purge()
296 cleanutx(sp); in purge()
297 tsp = sp; in purge()
299 Sactab = sp->sc_next; in purge()
303 savesp->sc_next = sp->sc_next; in purge()
305 (void) sprintf(Scratch, "purging <%s>", sp->sc_tag); in purge()
308 sp = sp->sc_next; in purge()
332 register struct sactab *sp; /* working pointer */ in dump_table() local
358 for (sp = Sactab; sp; sp = sp->sc_next) { in dump_table()
359 …size = strlen(sp->sc_tag) + strlen(sp->sc_type) + strlen(sp->sc_cmd) + strlen(sp->sc_comment) + SL… in dump_table()
364 (void) sprintf(p, "%s:%s:%d:%d:%d:%s:%s\n", sp->sc_tag, sp->sc_type, in dump_table()
365 sp->sc_flags, sp->sc_rsmax, sp->sc_pstate, sp->sc_cmd, sp->sc_comment); in dump_table()