更详细的排查过程:
图1:跟踪所有 syscall
图2:ioctl syscall 的 funcgraph
图3:ioctl syscal 的 LBR
图4: tty_ioctl 的 funcgraph
图5: tty_check_change 的 LBR
最后,关键的源代码注释:
exit.c:
318 │ /*
319 │ * Determine if a process group is "orphaned", according to the POSIX
320 │ * definition in 2.2.2.52. Orphaned process groups are not to be affected
321 │ * by terminal-generated stop signals. Newly orphaned process groups are
322 │ * to receive a SIGHUP and a SIGCONT.
323 │ *
324 │ * "I ask you, have you ever known what it is to be an orphan?"
325 │ */
326 │ static int will_become_orphaned_pgrp(struct pid *pgrp,
327 │ struct task_struct *ignored_task)
328 │ {
329 │ struct task_struct *p;
330 │
331 │
......
341 │
342 │ return 1;
343 │ }
#bpfsnoop
图1:跟踪所有 syscall
图2:ioctl syscall 的 funcgraph
图3:ioctl syscal 的 LBR
图4: tty_ioctl 的 funcgraph
图5: tty_check_change 的 LBR
最后,关键的源代码注释:
exit.c:
318 │ /*
319 │ * Determine if a process group is "orphaned", according to the POSIX
320 │ * definition in 2.2.2.52. Orphaned process groups are not to be affected
321 │ * by terminal-generated stop signals. Newly orphaned process groups are
322 │ * to receive a SIGHUP and a SIGCONT.
323 │ *
324 │ * "I ask you, have you ever known what it is to be an orphan?"
325 │ */
326 │ static int will_become_orphaned_pgrp(struct pid *pgrp,
327 │ struct task_struct *ignored_task)
328 │ {
329 │ struct task_struct *p;
330 │
331 │
......
341 │
342 │ return 1;
343 │ }
#bpfsnoop