Tag Info

New answers tagged

-1

I am missing one bit in the answers that is slightly related to dying parents: when a process writes on a pipe for which there is no reading process anymore, it gets a SIGPIPE. The standard action for SIGPIPE is termination. This can indeed cause processes to die. In fact, it is the standard way in which the program yes dies. If I execute (yes;echo $? ...


-1

So what above posters are saying is, the children don't die, the parent kills them (or sends them a signal on which they terminate). So you can have what you ask, if you program the Parent to (1) keep a record of all its children, and (2) send a signal to all its children. This is what the Shell does, and it should be what your parent process does. It may ...


8

When a process exits, all its children also die (unless you use NOHUP in which case they get back to init). This is correct if the process is a session leader. When a session leader dies, a SIGHUP is sent to all members of that session. In practice that means its children and their descendants. A process makes itself session leader by calling setsid. ...


59

When a process exits, all its children also die (unless you use NOHUP in which case they get back to init). This is wrong. Dead wrong. That person has been lying to you, either when they said that or when they said they knew something about Unix and processes. There are two ways in which the death of a process can indirectly cause the death of its ...


1

Groups are inherited by a process from its parent. Bash has no choice in the matter. A process running as root can obtain new supplementary groups upon request; a process not running as root can only relinquish supplementary groups. The command groups with no arguments returns its own list of groups (which is inherited from its parent): real group, ...


2

The groups are assigned during login before privileges are dropped. Your shell can't simply assign new groups to itself, otherwise it would be useless as a security system; what groups a process is in is maintained by the kernel. See the output of cat /proc/$$/status for example and see the Groups: line; that is the definitive list of groups your shell is in ...



Top 50 recent answers are included