Write portable signal code.