> This may or may not be a stupid question:
> How do I remove orphaned or defunct processes from my process list under
> AIX 220.127.116.11? The command
> chdev -l sys0 -a maxuproc='256'
This comand is just resetting the maximum number of user processes
allowed on the system. Perhaps the process table is rebuilt when you
do this, and the defunct processes are removed. This would have to be
classified as a side effect, I think. I doubt there is a system call
to remove defunct processes. The system keeps them around for a
reason: to provide a return code to the parent process when it issues
the wait() system call.
> seemed to clear out defunct processess. This makes me think there might
> be some C call or something that clears out defunct processes without
> having to reboot.the system.
> Any help you could provide will be greatly appreciated.
I think what you need to know is the identity of the process(es)
leaving behind the defuncts. Are there many of them? One or two is
nothing to worry about, but if you have 10s or 100s, then maybe you
need to look into it. Defunct (aka zombie) processes use no resources
other than a slot in the process table.
What is the parent process ID (PPID) of the defuncts? If it is '1',
then you need to figure out why the 'init' process is not reaping
orphaned processes like it's supposed to. Problems with init are often caused by an invalid or incorrect /etc/inittab file.
If the PPID is something other than 1, you need to figure out why the
process is creating children but not calling wait() (or an equivalent)
to capture the return code of the child and free up the process table
slot. If it's third party software, then I would complain loudly to
the vendor. If it's in-house software, go down the hall and yell at
the programmer (unless it's your own code, of course ;).