aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
AgeCommit message (Collapse)AuthorFilesLines
2007-02-23Fix up a couple more signal handlers to not do bad things that could causerussell1-22/+50
various undesirable results. The other day, I made Asterisk deadlock by hitting Control-C because of a bad signal handler. Now, signal handlers just set a flag and write to an alert pipe for the flag to be handled. Then, there is another thread that is monitoring for these flags. If being run in console mode, it is just the main thread. If Asterisk is in the background, a thread is created to do it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@56504 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-30The SIGHUP handler was implemented to allow admins to send SIGHUP to a runningrussell1-3/+17
Asterisk process to reload the configuration. However, doing the actual reload in the signal handler itself is a very bad thing to do, because the reload process includes calling non-reentrant functions such as malloc/calloc/etc. If Asterisk is running in the background, then the reload will happen immediately. However, if running in console mode, the reload doesn't work until something is typed at the console. That sort of defeats the purpose, but I don't see an easy way to get around it at this point. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@52903 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19Fix a memory leak on command line tab completion. The container for therussell1-1/+3
matches was freed, but the individual matches themselves were not. (issue #8851, arkadia) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51300 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-27We should always be using _exit() after a fork() or vfork() instead of exit().russell1-1/+1
This is because exit() does some extra cleanup which in some implementations of vfork(), for example, can actually modify the state of the parent process, causing very weird bugs or crashes. (issue #7971, Nick Gavrikov) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46361 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-26Back in revision 4798, this message was changed from using ast_cli() to directlyrussell1-1/+1
calling write(). During this change, checking if this was a remote console was removed. This caused this message about using "exit" or "quit" to exit an Asterisk console to come up in times where it did not make sense. This change restores the check to see if this is a remote console before printing the message. (fixes BE-4) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43708 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19fixes some verbose vs debug issues. patch from bug 2617mogorman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43269 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21Move the load_modules call so that if a module needsmogorman1-4/+4
realtime support it will work, none do currently but a good move none the less. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@40798 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-12remove some more bad examples of using printfkpfleming1-37/+25
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@37419 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-03fix a race condition that caused asterisk to log a *ton* of warnings on macrussell1-2/+3
osx about poll returning an error because the polled file descriptor was bad. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@36751 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-13revert a change that caused more problems than it fixed and fix the realrussell1-10/+5
problem in this code. fds was declared as an array of zero size which caused some weird problems, some of which would only be seen when compiling without optimizations. (fixes issues #7071, #7326, and #7305) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@33753 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-19This explicit poll is only needed on mac. In fact, it breaks some systemsrussell1-1/+5
such as some versions of Fedora, causing 'asterisk -rx' to never exit. This has been tested on systems showing the asterisk -rx problem, as well as other unaffected versions of linux, mac osx 10.4, and FreeBSD 6. (issue #7071) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@28754 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-07 Reset the value of ast_mainpid if we fork so future remote unix connections ↵bweschke1-0/+1
display the correct PID. #7098 (tzafrir reporting) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@25288 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-01Bug 6864 - drop realtime priority on ALL external processestilghman1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@24019 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11Bug 6097 - possible descriptor leaktilghman1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@19351 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-30Bug 6849 - trivial typo fixtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@16579 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-02Bug 6637 - Fixes for Solaristilghman1-5/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@11609 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-28adjust the keys directory when astvarlibdir is specified in asterisk.conf ↵russell1-1/+2
(issue #6602) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@11408 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14#ifdef the include too.bweschke1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9964 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14 #ifdef'd the prctl fix to only try and compile on linux systems. Thanks ↵bweschke1-0/+4
rizzo for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9961 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14 Fixed my silly backport error from r9861bweschke1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9870 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14 Merged changes from r9844 from /trunk. Make sure that PR_SET_DUMPABLE is ↵bweschke1-0/+7
set to make certain that we still dump core if Asterisk has setuid'd to run as non-root. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9861 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24completely arbitrary whitespace change for testing something with svnmerge ...russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8600 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-17update CLI copyright noticekpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8122 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-16do rlimit check _after_ reading config file, in case 'dumpcore' is specified ↵kpfleming1-4/+4
there git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8112 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-09commit user/group-related changes from trunkkpfleming1-0/+10
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7900 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-26cast time_t to an int in printf/scanf (issue #5635)russell1-6/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7634 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-23add license reference to copyright notice displayed when CLI session beginskpfleming1-4/+84
add 'show warranty' and 'show license' CLI commands (still need a complete list of non-GPL components included in Asterisk) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7606 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-14finish merging doxygen updates from issue #5605russell1-22/+36
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7096 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08issue #5569 minus lock.h changeskpfleming1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7024 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08whitespace fixkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7017 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08issue #5581kpfleming1-3/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7014 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08issue #5599kpfleming1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7007 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08issue #5621kpfleming1-0/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7004 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-05stop recompiling cli.c on every 'make'kpfleming1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6963 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-01issue #4678kpfleming1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6936 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-01optionally send silence during recording (issue #5135)kpfleming1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6925 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-31provide an alternate getloadavg implementation and a fallback for systems ↵kpfleming1-1/+6
that don't have it at all (issue #5549 with minor mods) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6903 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26change ast_strlen_zero to also check for the string to be definedrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6862 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26Allow limitation by loadavg not just calls (should be BSD friendly)...markster1-1/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6850 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-19/+56
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-29install 'rasterisk' symlink and update process name when used remotely ↵kpfleming1-0/+10
(issue #5318 with minor mod) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6688 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-25Fix restart in Mac OSX (bug #5251)markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6643 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14ensure that ast_safe_system() is thread-safe (issue #4947)kpfleming1-14/+34
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6603 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)kpfleming1-4/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-01eliminate the urgent handler message, since it can causing blocking in the ↵kpfleming1-0/+4
stdio library (issue #5087) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6492 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-31ensure revents fields are initialized before calling poll()kpfleming1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6476 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-23don't try to change run priority, EUID or EGID on restart if they were ↵kpfleming1-3/+10
already set (issue #4734 with minor mods) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6369 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-23make sure realtime/high scheduling priority is relinquished before executing ↵kpfleming1-2/+2
an AGI script (issue #4930) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6368 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-22make SIGURG handler message more obvious (issue #4878)kpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6364 f38db490-d61c-443f-a65b-d21fe96a405b