In a large bowl, sift together the sugar, flour, salt and cocoa.
In a second bowl, whisk the egg yolks.
Gradually add the milk and whisk well.
Gradually add the dry ingredients and whisk until smooth.
Pour the mixture into a heavy saucepan.
Heat over medium high heat and continue stirring/whisking until the mixture begins to boil, which should take 5 to 7 minutes.
Reduce the heat to medium and stir until thickened, about another 5 minutes.
Make sure you are stirring the mixture all the way to the bottom as that thickens first.
Once it's good and thick, stir in the butter and vanilla.
Remove from the heat.
Pour into the pie shell and set aside to cool for at least 2 hours.
Do not refrigerate, or the pie crust will get soggy.
*This recipe brought to you courtesy of Penzey's.*