Mix sugar, flour, salt, and cocoa in top of double boiler. Stir in milk and cook for 15 minutes, stirring constantly until thick. Add egg yolks, one at a time and stirring well after each one. Cook for 3 minutes and add butter, stir well and pour into baked pie shell. Cool.