Skip to main content
added 182 characters in body
Source Link
Pavel Šimerda
  • 7k
  • 3
  • 29
  • 34

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Note that all processes become zombies after being killed. You just don't see them because most parent processes clean up their children very quickly. You might want to file a bug report if a software doesn't clean up its zombies and they only get clean up by init once the parent process exits.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. 

If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason. In systems that would reuse old pid values, not keeping the records could result in much more severe problems like a software killing an entirely different process by accident.

See also: http://en.wikipedia.org/wiki/Zombie_process

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Note that all processes become zombies after being killed. You just don't see them because most parent processes clean up their children very quickly. You might want to file a bug report if a software doesn't clean up its zombies and they only get clean up by init once the parent process exits.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Note that all processes become zombies after being killed. You just don't see them because most parent processes clean up their children very quickly. You might want to file a bug report if a software doesn't clean up its zombies and they only get clean up by init once the parent process exits.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. 

If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason. In systems that would reuse old pid values, not keeping the records could result in much more severe problems like a software killing an entirely different process by accident.

See also: http://en.wikipedia.org/wiki/Zombie_process

Incorporated information from Richard.
Source Link
Pavel Šimerda
  • 7k
  • 3
  • 29
  • 34

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Note that all processes become zombies after being killed. You just don't see them because most parent processes clean up their children very quickly. You might want to file a bug report if a software doesn't clean up its zombies and they only get clean up by init once the parent process exits.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Note that all processes become zombies after being killed. You just don't see them because most parent processes clean up their children very quickly. You might want to file a bug report if a software doesn't clean up its zombies and they only get clean up by init once the parent process exits.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

added 689 characters in body
Source Link
Pavel Šimerda
  • 7k
  • 3
  • 29
  • 34

It's because it'sThe proces is already dead at the time. The process is no longer running, so itIt doesn't make sense to kill it again. The only reason it existsIt is because someone (the parent) may still wantrecorded in the process table to readallow the parent ti pick up its status.

The parent processYour additional question is responsiblewhy SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for callinga feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to removelearn the zombiestatus of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

It's because it's already dead. The process is no longer running, so it doesn't make sense to kill it. The only reason it exists is because someone (the parent) may still want to read its status.

The parent process is responsible for calling wait() to remove the zombie from the process table.

See also: http://en.wikipedia.org/wiki/Zombie_process

The proces is already dead at the time. It doesn't make sense to kill it again. It is still recorded in the process table to allow the parent ti pick up its status.

Your additional question is why SIGKILL doesn't remove it from the process table. You should first tell us why it should. I'm not aware of any single reason to let the user remove a defunct process from the process table. In operating system design, you should always have a good reason to do something before you ask why not to do it. You're asking for a feature with no actual use case.

Apart from the lack of purpose, it would have bad consequences. The parent calls wait() and/or waitpid() to learn the status of the children that exited. The result of the call is consistent whether it is called before the process becomes defunct, before you issue the SIGKILL, or after that. If the kernel didn't keep the records (i.e. the process would be removed from the process table), the behavior would have to be inconsistent and the parent would have to expect the inconsistency and cope with it for no valid reason.

See also: http://en.wikipedia.org/wiki/Zombie_process

Source Link
Pavel Šimerda
  • 7k
  • 3
  • 29
  • 34
Loading