Brett Bryant
dcdfb4aa89
Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed.
...
Fixes issue #10010 , and #9654 : 100% CPU usage caused by an asterisk console losing it's controlling terminal.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Brett Bryant
7b9318fedd
Reverted changes for earlier revisions 72259 to 72261. Issue #9654 , #10010
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Brett Bryant
89cc2e4b70
Fixes 100% load when controlling terminal disappears.
...
Issue #9654 , #10010
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Russell Bryant
fb50a2da95
Revert the patch from issue 9654 due to an unexpected side effect
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Brett Bryant
b9000f54b2
Fixed infinite loop when controlling terminal was lost
...
and return value of input function wasn't checked for
errors. This would cause 100% cpu to be taken up.
(closes issue #9654 , issue #10010 )
Reported by: mnicholson, and eserra
Idea for the patch from mnicholson, patched by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Joshua Colp
80d88816df
Update copyright notice. It's now the year 2007!
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Tilghman Lesher
2eaae45f81
Don't check for error when lowering priority (according to the manpage, it should never happen anyway). It might could happen, though, if another thread messed with the priority, so safeguard against that (reported via -dev list).
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
18 years ago
Russell Bryant
1c26e1c717
Fix up a couple more signal handlers to not do bad things that could cause
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@56504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
65a8360531
The SIGHUP handler was implemented to allow admins to send SIGHUP to a running
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@52903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
0a73ba87b1
Fix a memory leak on command line tab completion. The container for the
...
matches was freed, but the individual matches themselves were not.
(issue #8851 , arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
bf20deeba1
We should always be using _exit() after a fork() or vfork() instead of exit().
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@46361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
8c2fee974a
Back in revision 4798, this message was changed from using ast_cli() to directly
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@43708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Matt O'Gorman
942768c022
fixes some verbose vs debug issues. patch from bug 2617
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Matt O'Gorman
4514a22df3
Move the load_modules call so that if a module needs
...
realtime support it will work, none do currently but a good
move none the less.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Kevin P. Fleming
648bc1828d
remove some more bad examples of using printf
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
1cf6171b0c
fix a race condition that caused asterisk to log a *ton* of warnings on mac
...
osx about poll returning an error because the polled file descriptor was bad.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
2a72316550
revert a change that caused more problems than it fixed and fix the real
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@33753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
8506e078c5
This explicit poll is only needed on mac. In fact, it breaks some systems
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@28754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
BJ Weschke
053f005508
Reset the value of ast_mainpid if we fork so future remote unix connections display the correct PID. #7098 (tzafrir reporting)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
00c0af845d
Bug 6864 - drop realtime priority on ALL external processes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
aea2d73afa
Bug 6097 - possible descriptor leak
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
3585625b40
Bug 6849 - trivial typo fix
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
575c2bccd5
Bug 6637 - Fixes for Solaris
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
271ccecaf2
adjust the keys directory when astvarlibdir is specified in asterisk.conf (issue #6602 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
BJ Weschke
ba001a7d15
#ifdef the include too.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
BJ Weschke
4f144aa5e3
#ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
BJ Weschke
13f4e66b14
Fixed my silly backport error from r9861
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
BJ Weschke
ae8fe3738b
Merged changes from r9844 from /trunk. Make sure that PR_SET_DUMPABLE is set to make certain that we still dump core if Asterisk has setuid'd to run as non-root.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
2ae21cc5c3
completely arbitrary whitespace change for testing something with svnmerge ...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
2efc5a9e83
update CLI copyright notice
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
57144d5102
do rlimit check _after_ reading config file, in case 'dumpcore' is specified there
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
0e734920e8
commit user/group-related changes from trunk
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
a434f8877a
cast time_t to an int in printf/scanf (issue #5635 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
3ebe29c983
add license reference to copyright notice displayed when CLI session begins
...
add 'show warranty' and 'show license' CLI commands (still need a complete list of non-GPL components included in Asterisk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
a563eab49a
remove extraneous svn:executable properties
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
d8dfa4434d
finish merging doxygen updates from issue #5605
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
0941c32d38
issue #5569 minus lock.h changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
d56ce5d1f3
whitespace fix
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
9061716644
issue #5581
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
81bda951d2
issue #5599
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
6f4fabf043
issue #5621
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
da0d0f975a
stop recompiling cli.c on every 'make'
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
7ffb604a2f
issue #4678
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
03ceef35ac
optionally send silence during recording (issue #5135 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
c3f9388b23
provide an alternate getloadavg implementation and a fallback for systems that don't have it at all (issue #5549 with minor mods)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
a736096e0b
change ast_strlen_zero to also check for the string to be defined
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
0b36348b12
Allow limitation by loadavg not just calls (should be BSD friendly)...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
3453e3efa5
Doxygen documentation update from oej (issue #5505 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
61a0f7a65e
install 'rasterisk' symlink and update process name when used remotely (issue #5318 with minor mod)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
fcc0b23e18
Fix restart in Mac OSX (bug #5251 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago