Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-28 09:16:34
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_notify_parent_cldstop - notify parent of stopped/continued state change*@tsk: task reporting the state change*@for_ptracer: the notification is for ptracer*@why: CLD_{CONTINUED|STOPPED|TRAPPED} to report

Proto:static void do_notify_parent_cldstop(struct task_struct *tsk, bool for_ptracer, int why)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
boolfor_ptracer
intwhy
2021  If for_ptracer Then
2022  parent = Recipient of SIGCHLD, wait4() reports:
2023  Else
2024  tsk = group_leader
2025  parent = Real parent process:
2028  clear_siginfo( & info)
2029  si_signo = SIGCHLD
2030  si_errno = 0
2034  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2035  si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(parent))
2036  si_uid = from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk))
2037  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2039  task_cputime(tsk, & utime, & stime)
2040  si_utime = nsec_to_clock_t(utime)
2041  si_stime = nsec_to_clock_t(stime)
2043  si_code = why
2045  Case why == stopped child has continued
2046  si_status = SIGCONT
2047  Break
2048  Case why == child has stopped
2049  si_status = group_exit_code & 0x7f
2050  Break
2051  Case why == raced child has trapped
2052  si_status = exit code & 0x7f
2053  Break
2054  Default
2055  BUG()
2058  sighand = sighand
2059  spin_lock_irqsave( & siglock, flags)
2060  If sa_handler != gnore signal && Not (sa_flags & SA_FLAGS values:* SA_ONSTACK indicates that a registered stack_t will be used.* SA_RESTART flag to get restarting signals (which were the default long ago)* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.) Then __group_send_sig_info(SIGCHLD, & info, parent)
2066  __wake_up_parent(tsk, parent)
2067  spin_unlock_irqrestore( & siglock, flags)
Caller
NameDescribe
ptrace_stopThis must be called with current->sighand->siglock held.* This should be the path for all ptrace stops.* We always set current->last_siginfo while stopped here.* That makes it a way to test a stopped process for
do_signal_stopdo_signal_stop - handle group stop for SIGSTOP and other stop signals*@signr: signr causing group stop if initiating* If %JOBCTL_STOP_PENDING is not set yet, initiate group stop with @signr* and participate in it
get_signal
exit_signals