MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / schedule_to_kill

Function schedule_to_kill

modules/exec/kill.c:197–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197int schedule_to_kill( int pid )
198{
199 struct timer_link *tl;
200
201 if (time_to_kill <= 0)
202 return 0;
203
204 tl = shm_malloc(sizeof *tl);
205 if (!tl) {
206 LM_ERR("no shmem\n");
207 return -1;
208 }
209 memset(tl, 0, sizeof *tl);
210
211 lock();
212 tl->pid=pid;
213 tl->time_out=get_ticks()+time_to_kill;
214 tl->prev_tl = kill_list->last_tl.prev_tl;
215 tl->next_tl = &kill_list->last_tl;
216 kill_list->last_tl.prev_tl=tl;
217 tl->prev_tl->next_tl=tl;
218 unlock();
219
220 return 0;
221}
222
223int initialize_kill(void)
224{

Callers 2

exec_syncFunction · 0.85
start_async_execFunction · 0.85

Calls 2

shm_mallocFunction · 0.85
get_ticksFunction · 0.85

Tested by

no test coverage detected