• Russ Cox's avatar
    runtime: fix running under nohup · f3407f44
    Russ Cox authored
    There are two ways nohup(1) might be implemented:
    it might mask away the signal, or it might set the handler
    to SIG_IGN, both of which are inherited across fork+exec.
    So two fixes:
    
    * Make sure to preserve the inherited signal mask at
    minit instead of clearing it.
    
    * If the SIGHUP handler is SIG_IGN, leave it that way.
    
    Fixes #4491.
    
    R=golang-dev, mikioh.mikioh, iant
    CC=golang-dev
    https://golang.org/cl/7308102
    f3407f44
os_linux.h 1.27 KB