use sigaction replace signal
fix file size bug