summaryrefslogtreecommitdiff
path: root/daemon.c
AgeCommit message (Collapse)AuthorFilesLines
2005-09-30Move signal setting into service_loop()Libravatar H. Peter Anvin1-2/+2
2005-09-30socklen_t is unsigned int on most Linux platformsLibravatar H. Peter Anvin1-1/+1
2005-09-30Use xmalloc/xcallocLibravatar H. Peter Anvin1-6/+2
2005-09-30Don't need <alloca.h>Libravatar H. Peter Anvin1-1/+0
2005-09-30Merge with master.kernel.org:/pub/scm/git/git.gitLibravatar H. Peter Anvin1-2/+2
2005-09-29[PATCH] Make logerror() and loginfo() staticLibravatar Pavel Roskin1-2/+2
Make logerror() and loginfo() static logerror() and loginfo() in daemon.c are never declared and never called from other files, therefore they should be declared static. Found by sparse. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-28Remove variables not needed when using pollLibravatar Peter Anvin1-4/+0
2005-09-28NO_IPV6 support for git daemonLibravatar Peter Anvin1-16/+75
2005-09-27Restore chdir(".git")Libravatar H. Peter Anvin1-0/+2
2005-09-26Support a modicum of path validation, and allow an export all trees option.Libravatar H. Peter Anvin1-5/+67
2005-09-24[PATCH] Rename daemon.c's lognotice() to loginfo()Libravatar Petr Baudis1-3/+3
The syslog code logs with severity LOG_INFO in the loginfo() function, so make things less confusing. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24[PATCH] git-daemon --syslog to log through syslogLibravatar Petr Baudis1-7/+27
Well, this makes it even more clear that we need the packet reader and friends to use the daemon logging code. :/ Therefore, we at least indicate in the "Disconnect" log message if the child process exitted with an error code or not. Idea by Linus. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23daemon.c: pid_t is not int.Libravatar Junio C Hamano1-1/+1
Reported by Morten Welinder <mwelinder@gmail.com>. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] Verbose git-daemon loggingLibravatar Petr Baudis1-4/+90
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-11Use int instead of socklen_tLibravatar Junio C Hamano1-4/+4
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-07[PATCH] git-daemon --inetdLibravatar lars.doelle@on-line.de1-1/+3
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-08-23Include sys/time.h in daemon.c.Libravatar Jason Riedy1-0/+1
Some systems and feature levels want sys/time.h for fd_set functionality. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2005-08-05daemon.c: squelch error message from EINTRLibravatar Junio C Hamano1-2/+5
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-01[PATCH] Fix sparse warningsLibravatar Linus Torvalds1-2/+2
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-07-27[PATCH] GIT: Listen on IPv6 as well, if available.Libravatar YOSHIFUJI Hideaki1-31/+100
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-15Be slightly smarter about git-daemon client shutdownLibravatar Linus Torvalds1-20/+38
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-15git-daemon: actually remember the children we have outstandingLibravatar Linus Torvalds1-21/+121
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-15git-daemon: keep track of childrenLibravatar Linus Torvalds1-1/+43
We don't want them as zombies, and eventually we'll want to limit their number. Right now we just count them.
2005-07-15Add "--inetd" flag to git-daemonLibravatar Linus Torvalds1-1/+11
All credit go to Alexey Nezhdanov <snake@penza-gsm.ru>, I just ended up re-implementing his idea.
2005-07-15git-daemon: re-organize code a bit for --inetd flagLibravatar Linus Torvalds1-10/+10
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-13Add a "git-daemon" that listens on a TCP portLibravatar Linus Torvalds1-0/+117
.. and does a "git-upload-pack" on demand.