Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 12
    It's worth pointing out that signals that come directly from the terminal bypass permission checking, so Ctrl+C always succeeds in delivering signals unless you turn it off in the terminal attributes, whereas a kill command might fail. Commented Mar 15, 2015 at 23:07
  • 8
    +1, for sends a SIGINT to the foreground process group of the terminal. Commented May 3, 2015 at 7:06
  • Worth mentioning that the process group of the child is the same as the parent after fork. Minimal runnable C example at: unix.stackexchange.com/a/465112/32558 Commented Aug 27, 2018 at 15:42
  • 1
    Important note: tpgid and pgid are not the same thing. pgid is the process group id, while tpgid is the terminal process group id. From within a process you can change its pgid using os.setpgid() for example, but this does not change the tpgid. Source: linuxcommand.org/lc3_man_pages/ps1.html Commented Jan 29, 2020 at 23:42