Created
May 19, 2016 09:24
-
-
Save martende/3ccca3a97cb650808d2b83c4630ed258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shell: | |
> go build test.go | |
> ./test & | |
> kill -HUP `pidof test` | |
> cat > ./test | |
bash: /home/user/test: Text file busy | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os/signal" | |
"syscall" | |
"fmt" | |
) | |
func main() { | |
signal.Ignore(syscall.SIGHUP) | |
time.Sleep(1000 * time.Second) | |
fmt.Println("FINISHED") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment