1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:30:23 -07:00
TBR=rsc
OCL=29010
CL=29010
This commit is contained in:
Robert Griesemer 2009-05-18 16:48:38 -07:00
parent 7ff2536633
commit 500f6b8e84

View File

@ -587,7 +587,7 @@ func loggingHandler(h http.Handler) http.Handler {
func restartGodoc(c *http.Conn, r *http.Request) {
binary := os.Args[0];
if len(binary) > 0 || binary[0] != '/' {
if len(binary) > 0 && binary[0] != '/' {
binary = pathutil.Join(launchdir, binary);
}
pid, err := os.ForkExec(binary, os.Args, os.Environ(), "", []*os.File{os.Stdin, os.Stdout, os.Stderr});