MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / lwp_session_update_children_info

Function lwp_session_update_children_info

components/lwp/lwp_session.c:228–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228int lwp_session_update_children_info(rt_session_t session, pid_t sid)
229{
230 rt_list_t *node = RT_NULL;
231 rt_processgroup_t group = RT_NULL;
232
233 if (session == RT_NULL)
234 {
235 return -EINVAL;
236 }
237
238 SESS_LOCK_NESTED(session);
239
240 rt_list_for_each(node, &(session->processgroup))
241 {
242 group = (rt_processgroup_t)rt_list_entry(node, struct rt_processgroup, pgrp_list_node);
243 PGRP_LOCK_NESTED(group);
244 if (sid != -1)
245 {
246 group->sid = sid;
247 group->session = session;
248 lwp_pgrp_update_children_info(group, sid, group->pgid);
249 }
250 PGRP_UNLOCK(group);
251 }
252
253 SESS_UNLOCK(session);
254 return 0;
255}
256
257int lwp_session_set_foreground(rt_session_t session, pid_t pgid)
258{

Callers 1

lwp_session_deleteFunction · 0.85

Calls 1

Tested by

no test coverage detected