in reply to Is there any flaw with the way the below daemon forks child processes?

Aside from init(1M), no process can guarantee the generation of sequentially allocated sub-process PIDs since the scheduler is at liberty to cut in i.e. suspend the current process, at any time and start some other process(es) - hence you shouldn't be too surprised if you are seeing the allocation of non-sequential PIDs.

A user level that continues to overstate my experience :-))
  • Comment on Re: Is there any flaw with the way the below daemon forks child processes?