aboutsummaryrefslogtreecommitdiffstats
path: root/bitlbee.c
Commit message (Collapse)AuthorAgeLines
* Avoid propagating shutdown signal to all subprocessesdequis2015-10-30-0/+3
| | | | | | | | | | | | | | | | | | | | This was a sort-of-regression with 7233f68 While this behavior might seem desirable in some cases, multi-user installs like public servers would rather not kill children while upgrading. Turns out that pipes are inherited by forks, and writing in one side means there might be more than one listener that calls bitlbee_shutdown(). If the parent gets it, the children will get it too. If a child gets it, the parent and the other children get it too. This adds a sighandler_shutdown_setup() function that closes any previously existing pipes and disconnects the events from them, to create a new one. This is called again after forking each child process. While I'm sure this fixes the issue, I still don't understand why it *didn't* kill the forked processes in some cases. Worrying.
* Reindent everything to K&R style with tabsIndent2015-02-20-209/+184
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* random_bytes: Use /dev/urandom only, don't bother trying /dev/randomdequis2015-01-26-4/+0
| | | | | | Also abort() if there's no /dev/urandom See http://www.2uo.de/myths-about-urandom/ for details.
* Fix incorrect Free Software Foundation addressMatej Cepl2015-01-16-2/+2
|
* Use irc_write_all() to send the message in bitlbee_shutdowndequis2014-11-26-2/+4
| | | | | | This ensures that the message arrives by using the "now" parameter of irc_write_all(), because in my testing it didn't show up (even though surrounding it with printf() worked, in inetd mode)
* RIP native win32 support (use cygwin instead)dequis2014-09-27-6/+0
| | | | It has been broken for a very long time and nobody cared about it.
* Removed dead bit of code that was confusing me.Wilmer van der Gaast2012-06-10-10/+3
|
* Don't use AI_ADDRCONFIG at all for setting up a listening socket, since itWilmer van der Gaast2011-02-24-1/+5
| | | | | | only seems to cause problems when other programs don't use it. I hope this won't introduce new other problems..
* Fix compiler warnings. Also fixing irc_send_motd(), which so far got awayWilmer van der Gaast2010-09-05-1/+2
| | | | | with a horrible practice of reading the MOTD file one by one.
* Fixed shutdown sequence (could cause 100% CPU usage on SIGTERM).Wilmer van der Gaast2010-07-27-1/+1
|
* Merging main ui-fix.Wilmer van der Gaast2010-07-10-1/+2
|\
| * When addressing people in a chatroom, try to translate the nickname to theWilmer van der Gaast2010-07-05-1/+2
| | | | | | | | | | original unstripped version (without ugly underscores, also).
* | First part of the handshake, including sending a file descriptor to theWilmer van der Gaast2010-07-06-0/+2
|/ | | | | IPC master.
* Merging stuff from mainline (1.2.6).Wilmer van der Gaast2010-04-24-22/+57
|\
| * getaddrinfo(NULL) may return an IPv4 address first but we should definitelyWilmer van der Gaast2010-04-14-28/+48
| | | | | | | | | | prefer IPv6.
| * Log to stderr+syslog until daemonized. Current behaviour is too confusingWilmer van der Gaast2010-04-14-2/+8
| | | | | | | | | | and annoying.
| * Run setsid() when daemonizing. (Closes #581)Wilmer van der Gaast2010-04-14-0/+1
| |
| * Unset the IPV6_V6ONLY sockctl so listening on IPv6 will automatically alsoWilmer van der Gaast2010-04-07-1/+9
| | | | | | | | | | | | listen on IPv4 again. This should close #583 (and apparently also fix this assumption on many non-Linux systems).
* | Merging head. Most changes are not so relevant because they're to IMWilmer van der Gaast2010-03-20-11/+7
|\| | | | | | | | | modules.
| * Check the RESTART environment variable before closing fd's 0-2 since theWilmer van der Gaast2010-03-16-11/+7
| | | | | | | | | | previous approach broke upgrades to bzr >= 500.
* | Merging in head.Wilmer van der Gaast2010-03-14-5/+11
|\|
| * Close fd's 0,1,2 no matter what, not just if they're ttys. (Bug #476)Wilmer van der Gaast2010-03-14-5/+11
| |
* | Make purple use BitlBee's event handling API. Since the APIs never reallyWilmer van der Gaast2009-10-11-3/+3
|/ | | | | | | | | | diverged too much this is fairly transparent. I did rename and redefine GAIM_INPUT_* variables to really make it work without adding another stupid layer in between. One problem left, the new libpurple input API doesn't care about return values. Fixing that in the next CL.
* Merging changes from Jelmer: It's now possible to cross-compile a WindowsWilmer van der Gaast2008-06-30-4/+5
|\ | | | | | | | | version of BitlBee from Linux. No working SSL support yet though!
| * Merge integration branch.Jelmer Vernooij2008-06-09-6/+10
| |\
| * \ Merge trunk.Jelmer Vernooij2008-04-02-61/+63
| |\ \
| * | | #ifdef out some Win32-incompatible code blocksJelmer Vernooij2006-05-25-1/+5
| | | |
| * | | [merge] WilmerJelmer Vernooij2006-05-25-2/+2
| |\ \ \
| * \ \ \ [merge] WilmerJelmer Vernooij2006-03-01-58/+124
| |\ \ \ \
| * \ \ \ \ Merge WilmerJelmer Vernooij2006-01-10-169/+56
| |\ \ \ \ \
| * \ \ \ \ \ Merge WilmerJelmer Vernooij2005-12-15-247/+9
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge WilmerJelmer Vernooij2005-11-19-1/+1
| |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ Merge WilmerJelmer Vernooij2005-11-19-1/+1
| | |\ \ \ \ \ \ \
| * | | | | | | | | Merge new changes from pluginable and WilmerJelmer Vernooij2005-11-15-6/+0
| |\| | | | | | | |
| | * | | | | | | | Merge changes from WilmerJelmer Vernooij2005-11-15-6/+0
| | |\ \ \ \ \ \ \ \
| * | | | | | | | | | Import work on services-based Win32 portJelmer Vernooij2005-11-07-6/+0
| |/ / / / / / / / /
| * | | | | | | | | Migrate my pluginable branch to use Wilmers' branch as parentJelmer Vernooij2005-11-07-6/+33
| | | | | | | | | |
* | | | | | | | | | Now using an environment variable instead of a flag to pass state info whenWilmer van der Gaast2008-06-29-1/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | restarting the ForkDaemon. Preparing for a proper fallback when execv() fails. (Bug #425)
* | | | | | | | | Added ClientInterface configuration option to make BitlBee bind() to aWilmer van der Gaast2008-04-06-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific interface before connecting to a remote host.
* | | | | | | | | Rearranged some event handling code.Wilmer van der Gaast2008-04-02-4/+8
| |_|_|_|_|_|_|/ |/| | | | | | |
* | | | | | | | Making AI_ADDRCONFIG optional, it doesn't exist on at least NetBSD andWilmer van der Gaast2008-02-10-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (IIRC) OpenBSD systems.
* | | | | | | | Fixing some Solaris compiler warnings (u_int->uint, adding some typecastsWilmer van der Gaast2008-01-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for pid_t variables).
* | | | | | | | Fixed the epoll+ForkDaemon combination. The libevent event handlingWilmer van der Gaast2007-11-28-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | didn't work very well on Linux 2.6 (and possibly others) in ForkDaemon mode.
* | | | | | | | Fixed NULL pointer dereference (in printf) when connected to a non-socketWilmer van der Gaast2007-11-19-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (which I do quite often when testing stuff).
* | | | | | | | Merging from Jelmer.Wilmer van der Gaast2007-11-05-56/+37
|\ \ \ \ \ \ \ \
| * | | | | | | | Fix indentation.Jelmer Vernooij2007-10-18-10/+10
| | | | | | | | |
| * | | | | | | | Use standard functions for dealing with both IPv6 and IPv4. Jelmer Vernooij2007-10-18-58/+37
|/ / / / / / / /
* | | | | | | | Fixed uninitialized memory issue in bitlbee.c listen socket setup code.Wilmer van der Gaast2007-02-18-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #230 and #183.
* | | | | | | | Merging from main.Wilmer van der Gaast2006-07-14-12/+31
|\ \ \ \ \ \ \ \
| * | | | | | | | Removed #defines used to simulate systems without IPv6 support.Wilmer van der Gaast2006-07-12-3/+0
| | | | | | | | |