Run-time testing for availability of libpthread functions does not
work reliably on some platforms. So, avoid doing so on anything other than Linux/i386. For all other platforms, assume that the code is not linked against libpthread. For ShellInABox, this is always the correct assumption. But if the code gets embedded into other projects, this might have to be changed. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@141 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
parent
bb4dbaa5f5
commit
ca18a5346f
9 changed files with 2144 additions and 2361 deletions
|
@ -3,6 +3,13 @@
|
||||||
* Making it easier to host the terminal on non-root URLs by always
|
* Making it easier to host the terminal on non-root URLs by always
|
||||||
redirecting to a URL that includes a trailing slash.
|
redirecting to a URL that includes a trailing slash.
|
||||||
|
|
||||||
|
* Run-time testing for availability of libpthread functions does not
|
||||||
|
work reliably on some platforms. So, avoid doing so on anything
|
||||||
|
other than Linux/i386. For all other platforms, assume that the code
|
||||||
|
is not linked against libpthread. For ShellInABox, this is always
|
||||||
|
the correct assumption. But if the code gets embedded into other
|
||||||
|
projects, this might have to be changed.
|
||||||
|
|
||||||
2009-07-05 Markus Gutschke <markus@shellinabox.com>
|
2009-07-05 Markus Gutschke <markus@shellinabox.com>
|
||||||
|
|
||||||
* Released version 2.9
|
* Released version 2.9
|
||||||
|
|
2
config.h
2
config.h
|
@ -132,7 +132,7 @@
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
/* Most recent revision number in the version control system */
|
/* Most recent revision number in the version control system */
|
||||||
#define VCS_REVISION "140"
|
#define VCS_REVISION "141"
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "2.9"
|
#define VERSION "2.9"
|
||||||
|
|
|
@ -2,7 +2,7 @@ AC_PREREQ(2.57)
|
||||||
|
|
||||||
dnl This is the one location where the authoritative version number is stored
|
dnl This is the one location where the authoritative version number is stored
|
||||||
AC_INIT(shellinabox, 2.9, markus@shellinabox.com)
|
AC_INIT(shellinabox, 2.9, markus@shellinabox.com)
|
||||||
VCS_REVISION=140
|
VCS_REVISION=141
|
||||||
AC_SUBST(VCS_REVISION)
|
AC_SUBST(VCS_REVISION)
|
||||||
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
|
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
|
||||||
[Most recent revision number in the version control system])
|
[Most recent revision number in the version control system])
|
||||||
|
|
|
@ -1693,7 +1693,7 @@ VT100.prototype.toggleBell = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
VT100.prototype.about = function() {
|
VT100.prototype.about = function() {
|
||||||
alert("VT100 Terminal Emulator " + "2.9 (revision 140)" +
|
alert("VT100 Terminal Emulator " + "2.9 (revision 141)" +
|
||||||
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com");
|
"For more information check http://shellinabox.com");
|
||||||
};
|
};
|
||||||
|
|
|
@ -314,7 +314,7 @@ int serverSupportsSSL(void) {
|
||||||
// pthread_once(), instead. We perform run-time checks for whether we are
|
// pthread_once(), instead. We perform run-time checks for whether we are
|
||||||
// single- or multi-threaded, so that the same code can be used.
|
// single- or multi-threaded, so that the same code can be used.
|
||||||
// This currently only works on Linux.
|
// This currently only works on Linux.
|
||||||
#if defined(HAVE_PTHREAD_H) && defined(__linux__)
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (!!&pthread_once) {
|
if (!!&pthread_once) {
|
||||||
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||||
pthread_once(&once, loadSSL);
|
pthread_once(&once, loadSSL);
|
||||||
|
@ -754,9 +754,12 @@ void sslBlockSigPipe(void) {
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
sigaddset(&set, SIGPIPE);
|
sigaddset(&set, SIGPIPE);
|
||||||
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (&pthread_sigmask) {
|
if (&pthread_sigmask) {
|
||||||
dcheck(!pthread_sigmask(SIG_BLOCK, &set, NULL));
|
dcheck(!pthread_sigmask(SIG_BLOCK, &set, NULL));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
dcheck(!sigprocmask(SIG_BLOCK, &set, NULL));
|
dcheck(!sigprocmask(SIG_BLOCK, &set, NULL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -772,9 +775,12 @@ static void dummysignal(int signo) {
|
||||||
static int sigwait(const sigset_t *set, int *sig) {
|
static int sigwait(const sigset_t *set, int *sig) {
|
||||||
sigset_t mask, old_mask;
|
sigset_t mask, old_mask;
|
||||||
sigfillset(&mask);
|
sigfillset(&mask);
|
||||||
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (&pthread_sigmask) {
|
if (&pthread_sigmask) {
|
||||||
dcheck(!pthread_sigmask(SIG_BLOCK, &mask, &old_mask));
|
dcheck(!pthread_sigmask(SIG_BLOCK, &mask, &old_mask));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
dcheck(!sigprocmask(SIG_BLOCK, &mask, &old_mask));
|
dcheck(!sigprocmask(SIG_BLOCK, &mask, &old_mask));
|
||||||
}
|
}
|
||||||
#ifndef NSIG
|
#ifndef NSIG
|
||||||
|
@ -791,9 +797,12 @@ static int sigwait(const sigset_t *set, int *sig) {
|
||||||
}
|
}
|
||||||
dummysignalno = -1;
|
dummysignalno = -1;
|
||||||
sigsuspend(&mask);
|
sigsuspend(&mask);
|
||||||
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (&pthread_sigmask) {
|
if (&pthread_sigmask) {
|
||||||
dcheck(!pthread_sigmask(SIG_SETMASK, &old_mask, NULL));
|
dcheck(!pthread_sigmask(SIG_SETMASK, &old_mask, NULL));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
dcheck(!sigprocmask(SIG_BLOCK, &old_mask, NULL));
|
dcheck(!sigprocmask(SIG_BLOCK, &old_mask, NULL));
|
||||||
}
|
}
|
||||||
return dummysignalno;
|
return dummysignalno;
|
||||||
|
@ -809,9 +818,12 @@ int sslUnblockSigPipe(void) {
|
||||||
}
|
}
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
sigaddset(&set, SIGPIPE);
|
sigaddset(&set, SIGPIPE);
|
||||||
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (&pthread_sigmask) {
|
if (&pthread_sigmask) {
|
||||||
dcheck(!pthread_sigmask(SIG_UNBLOCK, &set, NULL));
|
dcheck(!pthread_sigmask(SIG_UNBLOCK, &set, NULL));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
dcheck(!sigprocmask(SIG_UNBLOCK, &set, NULL));
|
dcheck(!sigprocmask(SIG_UNBLOCK, &set, NULL));
|
||||||
}
|
}
|
||||||
return signum;
|
return signum;
|
||||||
|
|
|
@ -358,7 +358,7 @@ int supportsPAM(void) {
|
||||||
// pthread_once(), instead. We perform run-time checks for whether we are
|
// pthread_once(), instead. We perform run-time checks for whether we are
|
||||||
// single- or multi-threaded, so that the same code can be used.
|
// single- or multi-threaded, so that the same code can be used.
|
||||||
// This currently only works on Linux.
|
// This currently only works on Linux.
|
||||||
#if defined(HAVE_PTHREAD_H) && defined(__linux__)
|
#if defined(HAVE_PTHREAD_H) && defined(__linux__) && defined(__i386__)
|
||||||
if (!!&pthread_once) {
|
if (!!&pthread_once) {
|
||||||
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||||
pthread_once(&once, loadPAM);
|
pthread_once(&once, loadPAM);
|
||||||
|
|
|
@ -355,7 +355,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ShellInABox.prototype.about = function() {
|
ShellInABox.prototype.about = function() {
|
||||||
alert("Shell In A Box version " + "2.9 (revision 140)" +
|
alert("Shell In A Box version " + "2.9 (revision 141)" +
|
||||||
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com" +
|
"For more information check http://shellinabox.com" +
|
||||||
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
|
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
|
||||||
|
|
|
@ -1693,7 +1693,7 @@ VT100.prototype.toggleBell = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
VT100.prototype.about = function() {
|
VT100.prototype.about = function() {
|
||||||
alert("VT100 Terminal Emulator " + "2.9 (revision 140)" +
|
alert("VT100 Terminal Emulator " + "2.9 (revision 141)" +
|
||||||
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
"\nCopyright 2008-2009 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com");
|
"For more information check http://shellinabox.com");
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue