Skip to content
  • Stephen Boyd's avatar
    instaweb: restart server if already running · 0b624b4c
    Stephen Boyd authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Running 'git instaweb' when an instaweb server is already running will
    fail (at least when the port is the same) and overwrite the pid file
    used to track the currently running server. This turns out to be
    especially annoying when the user tries to stop the previously running
    server with 'git instaweb --stop' and is instead greeted with an error
    message because the pid file has been destroyed.
    
    Instead of allowing a user to start two instaweb servers, stop the
    currently running server first and then start the new one. This should
    be fine because it was never really possible to start two instaweb
    servers in the first place due to the pid file issue outlined above.
    
    Signed-off-by: default avatarStephen Boyd <bebarino@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0b624b4c