Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Let a parent know about the death of a child.* For a stopped/continued status change, use do_notify_parent_cldstop instead.* Returns true if our parent ignored us and so we've switched to* self-reaping.

Proto:bool do_notify_parent(struct task_struct *tsk, int sig)

Type:bool

Parameter:

TypeParameterName
struct task_struct *tsk
intsig
1910  bool autoreap = false
1913  BUG_ON(sig == - 1)
1916  BUG_ON(task_is_stopped_or_traced(tsk))
1918  BUG_ON(!ptrace && (group_leader != tsk || !thread_group_empty(tsk)))
1922  do_notify_pidfd(tsk)
1924  If sig != SIGCHLD Then
1929  If Thread group tracking: != self_exec_id Then sig = SIGCHLD
1933  clear_siginfo( & info)
1934  si_signo = sig
1935  si_errno = 0
1947  _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
1948  si_pid = task_pid_nr_ns(tsk, task_active_pid_ns( Recipient of SIGCHLD, wait4() reports: ))
1949  si_uid = from_kuid_munged(task_cred_xxx( Recipient of SIGCHLD, wait4() reports: , user_ns), task_uid(tsk))
1951  _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()
1953  task_cputime(tsk, & utime, & stime)
1954  si_utime = nsec_to_clock_t(utime + utime)
1955  si_stime = nsec_to_clock_t(stime + stime)
1957  si_status = exit code & 0x7f
1958  If exit code & 0x80 Then si_code = child terminated abnormally
1960  Else if exit code & 0x7f Then si_code = child was killed
1962  Else
1963  si_code = child has exited
1964  si_status = exit code >> 8
1967  psig = sighand
1968  spin_lock_irqsave( & siglock, flags)
1969  If Not ptrace && sig == SIGCHLD && ( sa_handler == gnore signal || sa_flags & SA_NOCLDWAIT ) Then
1987  autoreap = true
1988  If sa_handler == gnore signal Then sig = 0
1991  If Test if 'sig' is valid signal. Use this instead of testing _NSIG directly && sig Then __group_send_sig_info(sig, & info, Recipient of SIGCHLD, wait4() reports: )
1993  __wake_up_parent(tsk, Recipient of SIGCHLD, wait4() reports: )
1994  spin_unlock_irqrestore( & siglock, flags)
1996  Return autoreap
Caller
NameDescribe
reparent_leaderAny that need to be release_task'd are put on the @dead list.
exit_notifySend signals to all our closest relatives so that they know* to properly mourn us..
wait_task_zombieHandle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have
__ptrace_detachCalled with tasklist_lock held for writing