Turn on autoflush (see perlvar):
$| = 1; [download]
In reply to Re^3: Print inside SIGNALS by shmem in thread Print inside SIGNALS by pedrete