2014-05-21 14:58:42 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2014-05-23 14:42:06 +00:00
|
|
|
pid := os.Getpid()
|
|
|
|
fmt.Println(pid)
|
2014-05-21 14:58:42 +00:00
|
|
|
|
|
|
|
time.Sleep(3 * time.Second)
|
|
|
|
for {
|
2014-05-23 14:42:06 +00:00
|
|
|
fmt.Println(pid)
|
2014-05-21 14:58:42 +00:00
|
|
|
}
|
|
|
|
}
|