aboutsummaryrefslogtreecommitdiff
path: root/generate-cmdlist.sh
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2010-05-28 21:11:24 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-02 11:49:33 -0700
commitd94775e1f9a9239a823b9aa52d754f9ec2635e6d (patch)
treefe08ad9da75c39405a91958be3418178d8ed897b /generate-cmdlist.sh
parentd1127622f5e4aa2abf6b492f6e43c0e17c3e0442 (diff)
downloadgit-d94775e1f9a9239a823b9aa52d754f9ec2635e6d.tar.gz
git-d94775e1f9a9239a823b9aa52d754f9ec2635e6d.tar.xz
git-instaweb: Wait for server to start before running web browser
Add generic httpd_is_ready subroutine, which busy-waits for web server to be started, by checking if $port is opened on localhost. This is used to avoid situation where web browser is started before web server is ready to accept connection, and fails. It uses IO::Socket::INET module, which is core Perl module since v5.6.0. Alternate solution, possible for those web servers that can run arbitrary code hooks after they bind the listen socket (after they start accepting connections), would be to use some kind of blocking mechanism: FIFO or lockfile, see http://thread.gmane.org/gmane.comp.version-control.git/147337/focus=147566 This can be always added later, as a web server specific branch in httpd_is_ready function. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'generate-cmdlist.sh')
0 files changed, 0 insertions, 0 deletions