Since there has been a lot of misinformation thrown about in this thread here is the fast and simple way that the population cap in the init settings works.
1)First two waves are hardcoded and are not affected by the cap. Even if every other dwarf in the universe is dead, you will still get the first two waves.
2)When the diplomat leaves your fortress he reports your current population to the mountain homes. This means that if your diplomat dies in horrible ways before he can leave then migrants will keep coming. The diplomat has to make it out alive to stop the migrants.
3)If your current population is larger then the population cap, then the mountain homes will no longer send migrants out. If the mountain homes is far enough away from your current fort, you may still get another migrant wave or two that were "traveling" before the diplomat left but had not yet reached your fortress.
4)A population cap of 0 is ignored. Set it to 1 if you don't want migrants.
5)Population cap does not affect current births in your fortress. That is what the child cap is for.
What this means: You are going to get at least 2 migrant waves. Kill them if you want, but there is nothing you can do about it. The diplomat has to make it to your fort, talk to your leader, and leaver to stop the migrants. Let him do this at least once after your population has reached the cap. It will take a year or two before migrants stop showing up after the diplomat leaves.
Some further testing I've done in the past week with 34.10 on this topic.
I've removed the [ACTIVE:SEASON] entry for dwarves in entity_default.txt in the raws. This prevents caravans and the outpost liaison/diplomat from ever visiting the fort. Not even once. Never ever. Never.
With that, I've generated three completely new worlds, and three completely new forts, one per world. One with a population cap of zero, one with a population cap of 7, and one with a population cap of 90.
I've then run the fort for 3 years, post embark, to see what the migrant waves will do, and what the resulting population will be.
The results are: Two waves of migrants came to the fort, and then all migration waves stopped. This resulted in 17, 22, and 18 total populations, respectively, after three seasons passed, post-embark. For the remaining 9 seasons, each season displayed "The fortress attracted no migrants this season" and everything else worked as usual/normal/expected.
So while it is true you will always get two migrant waves after embarking, I have not observed that the migration waves will continue after that, if the outpost liaison/diplomat never visits the fortress.
Similarly, in an earlier fort, I had a population cap of 60. I let the outpost liaison visit once, during the first year, disabled him, and I received migrants up to a population of exactly 60, and then the migration waves stopped. No further visit was required to stop the migration waves.
I look forward to confirmation or denial of these results in 34.10, if anyone is inclined.