1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-12 20:23:02 +01:00
Commit graph

164 commits

Author SHA1 Message Date
Junio C Hamano
1bedd4ca21 daemon.c: pid_t is not int.
Reported by Morten Welinder <mwelinder@gmail.com>.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23 23:26:55 -07:00
Petr Baudis
f8ff0c0641 [PATCH] Verbose git-daemon logging
This patch makes git-daemon --verbose log some useful things on stderr -
in particular connects, disconnects and upload requests, and in such a
way to be able to trace a particular session. Some more errors are now
also logged (even when --verbose is not passed). It is still not perfect
since messages produced by the non-daemon-specific code are obviously
not formatted properly.

[jc: With minor fix up in the log line truncation, and
 use of write(2) as suggested by Linus.]

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 18:00:28 -07:00
Junio C Hamano
7fa090844f Use int instead of socklen_t
This should work around the compilation problem Johannes Schindelin
and others had on Mac OS/X.

Quoting Linus:

    Any operating system where socklen_t is anything else than "int" is
    terminally broken. The people who introduced that typedef were confused,
    and I actually had to argue with them that it was fundamentally wrong:
    there is no other valid type than "int" that makes sense for it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11 18:55:20 -07:00
lars.doelle@on-line.de
7c3693f1f2 [PATCH] git-daemon --inetd
git-daemon using inetd. does not work properly. inetd routes stderr onto the
network line just like stdout, which was apparently not expected to be so.

As the result of this, the stream is closed by the receiver, because some
"Packing %d objects\n" originating from pack_objects is first reported over
the line instead of the expected pack_header, and so the SIGNATURE test
fails.  Here is a workaround.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 22:08:30 -07:00
Jason Riedy
3cd6ecda4a Include sys/time.h in daemon.c.
Some systems and feature levels want sys/time.h for fd_set
functionality.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2005-08-23 20:41:12 -07:00
Junio C Hamano
1eef0b33c6 daemon.c: squelch error message from EINTR
Every time after servicing the connection, select() first fails
with EINTR and ends up waiting for one second before serving the
next client.  The sleep() was placed by the original author per
suggestion from the list to avoid spinning on failing select,
but at least this EINTR situation should not result in "at most
one client per second" service limit.

I am not sure if this is the right fix, but WTH.  The king
penguin says that serious people would run the daemon under
inetd anyway, and I agree with that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-05 01:27:13 -07:00
Linus Torvalds
4d8fa916c9 [PATCH] Fix sparse warnings
A few sparse warnings have crept in again since I checked last time:
undeclared variables with global scope.

Fix them by marking the private variables properly "static".

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-01 13:28:58 -07:00
YOSHIFUJI Hideaki
df076bdbcc [PATCH] GIT: Listen on IPv6 as well, if available.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-27 22:47:07 -07:00
Linus Torvalds
02d57da4a5 Be slightly smarter about git-daemon client shutdown
Shut down connections that haven't even identified themselves as git
clients first.  That should get rid of people who just connect to the
port and wait for something to happen.
2005-07-15 22:53:31 -07:00
Linus Torvalds
66e631def8 git-daemon: actually remember the children we have outstanding
This is using a lockless approach that allows us to handle children
dying without having to block SIGCHLD.

Right now our "solution" to too many kids is pretty damn rough, but it
at least shows what you can do.
2005-07-15 21:51:57 -07:00
Linus Torvalds
eaa9491955 git-daemon: keep track of children
We don't want them as zombies, and eventually we'll want to limit their
number. Right now we just count them.
2005-07-15 20:42:28 -07:00
Linus Torvalds
e64e1b79d7 Add "--inetd" flag to git-daemon
All credit go to Alexey Nezhdanov <snake@penza-gsm.ru>, I just ended up
re-implementing his idea.
2005-07-15 09:32:16 -07:00
Linus Torvalds
7d80694af1 git-daemon: re-organize code a bit for --inetd flag
Alexey Nezhdanov sent a patch that made git-daemon usable from inetd (ie
where inetd has already done the accept on the new connection, the fork,
and the setup of stdin/stdout).  I wanted to organize the thing slightly
differently, though.
2005-07-15 09:27:05 -07:00
Linus Torvalds
a87e8be2ae Add a "git-daemon" that listens on a TCP port
.. and does a "git-upload-pack" on demand.
2005-07-13 19:45:26 -07:00