.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=114
This commit is contained in:
parent
8e1c3925e3
commit
6cd06caeb9
13
Agreement
13
Agreement
@ -3,7 +3,12 @@ http://www.research.att.com/sw/download/beta/
|
|||||||
User: `I accept www.opensource.org/licenses/cpl'
|
User: `I accept www.opensource.org/licenses/cpl'
|
||||||
Password: `.'
|
Password: `.'
|
||||||
|
|
||||||
wget --user='I accept www.opensource.org/licenses/cpl' --password='.' \
|
#user='I accept www.opensource.org/licenses/eclipse'
|
||||||
http://www2.research.att.com/sw/download/beta/ast-ksh.${version}.tgz \
|
user='I accept www.opensource.org/licenses/cpl'
|
||||||
http://www2.research.att.com/sw/download/beta/INIT.${version}.tgz \
|
#subdir=beta
|
||||||
http://www2.research.att.com/sw/download/beta/ast-base.${version}.tgz
|
subdir=tgz
|
||||||
|
version=2012-02-29
|
||||||
|
wget --user="${user}" --password='.' \
|
||||||
|
http://www2.research.att.com/sw/download/${subdir}/ast-ksh.${version}.tgz \
|
||||||
|
http://www2.research.att.com/sw/download/${subdir}/INIT.${version}.tgz \
|
||||||
|
http://www2.research.att.com/sw/download/${subdir}/ast-base.${version}.tgz
|
||||||
|
221
EPL
Normal file
221
EPL
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
+------------------------------------------------------------------------------+
|
||||||
|
| This license covers all software that refers to the URL |
|
||||||
|
| http://www.eclipse.org/org/documents/epl-v10.html |
|
||||||
|
+------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||||
|
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||||
|
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||||
|
|
||||||
|
1. DEFINITIONS
|
||||||
|
|
||||||
|
"Contribution" means:
|
||||||
|
|
||||||
|
a) in the case of the initial Contributor, the initial code and
|
||||||
|
documentation distributed under this Agreement, and
|
||||||
|
|
||||||
|
b) in the case of each subsequent Contributor:
|
||||||
|
|
||||||
|
i) changes to the Program, and
|
||||||
|
|
||||||
|
ii) additions to the Program;
|
||||||
|
|
||||||
|
where such changes and/or additions to the Program originate from and are
|
||||||
|
distributed by that particular Contributor. A Contribution 'originates' from
|
||||||
|
a Contributor if it was added to the Program by such Contributor itself or
|
||||||
|
anyone acting on such Contributor's behalf. Contributions do not include
|
||||||
|
additions to the Program which: (i) are separate modules of software
|
||||||
|
distributed in conjunction with the Program under their own license
|
||||||
|
agreement, and (ii) are not derivative works of the Program.
|
||||||
|
|
||||||
|
"Contributor" means any person or entity that distributes the Program.
|
||||||
|
|
||||||
|
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
||||||
|
necessarily infringed by the use or sale of its Contribution alone or when
|
||||||
|
combined with the Program.
|
||||||
|
|
||||||
|
"Program" means the Contributions distributed in accordance with this
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
"Recipient" means anyone who receives the Program under this Agreement,
|
||||||
|
including all Contributors.
|
||||||
|
|
||||||
|
2. GRANT OF RIGHTS
|
||||||
|
|
||||||
|
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
reproduce, prepare derivative works of, publicly display, publicly perform,
|
||||||
|
distribute and sublicense the Contribution of such Contributor, if any, and
|
||||||
|
such derivative works, in source code and object code form.
|
||||||
|
|
||||||
|
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
||||||
|
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
||||||
|
transfer the Contribution of such Contributor, if any, in source code and
|
||||||
|
object code form. This patent license shall apply to the combination of the
|
||||||
|
Contribution and the Program if, at the time the Contribution is added by
|
||||||
|
the Contributor, such addition of the Contribution causes such combination
|
||||||
|
to be covered by the Licensed Patents. The patent license shall not apply to
|
||||||
|
any other combinations which include the Contribution. No hardware per se is
|
||||||
|
licensed hereunder.
|
||||||
|
|
||||||
|
c) Recipient understands that although each Contributor grants the licenses
|
||||||
|
to its Contributions set forth herein, no assurances are provided by any
|
||||||
|
Contributor that the Program does not infringe the patent or other
|
||||||
|
intellectual property rights of any other entity. Each Contributor disclaims
|
||||||
|
any liability to Recipient for claims brought by any other entity based on
|
||||||
|
infringement of intellectual property rights or otherwise. As a condition to
|
||||||
|
exercising the rights and licenses granted hereunder, each Recipient hereby
|
||||||
|
assumes sole responsibility to secure any other intellectual property rights
|
||||||
|
needed, if any. For example, if a third party patent license is required to
|
||||||
|
allow Recipient to distribute the Program, it is Recipient's responsibility
|
||||||
|
to acquire that license before distributing the Program.
|
||||||
|
|
||||||
|
d) Each Contributor represents that to its knowledge it has sufficient
|
||||||
|
copyright rights in its Contribution, if any, to grant the copyright license
|
||||||
|
set forth in this Agreement.
|
||||||
|
|
||||||
|
3. REQUIREMENTS
|
||||||
|
|
||||||
|
A Contributor may choose to distribute the Program in object code form under
|
||||||
|
its own license agreement, provided that:
|
||||||
|
|
||||||
|
a) it complies with the terms and conditions of this Agreement; and
|
||||||
|
|
||||||
|
b) its license agreement:
|
||||||
|
|
||||||
|
i) effectively disclaims on behalf of all Contributors all warranties and
|
||||||
|
conditions, express and implied, including warranties or conditions of title
|
||||||
|
and non-infringement, and implied warranties or conditions of
|
||||||
|
merchantability and fitness for a particular purpose;
|
||||||
|
|
||||||
|
ii) effectively excludes on behalf of all Contributors all liability for
|
||||||
|
damages, including direct, indirect, special, incidental and consequential
|
||||||
|
damages, such as lost profits;
|
||||||
|
|
||||||
|
iii) states that any provisions which differ from this Agreement are offered
|
||||||
|
by that Contributor alone and not by any other party; and
|
||||||
|
|
||||||
|
iv) states that source code for the Program is available from such
|
||||||
|
Contributor, and informs licensees how to obtain it in a reasonable manner
|
||||||
|
on or through a medium customarily used for software exchange.
|
||||||
|
|
||||||
|
When the Program is made available in source code form:
|
||||||
|
|
||||||
|
a) it must be made available under this Agreement; and
|
||||||
|
|
||||||
|
b) a copy of this Agreement must be included with each copy of the Program.
|
||||||
|
|
||||||
|
Contributors may not remove or alter any copyright notices contained within
|
||||||
|
the Program.
|
||||||
|
|
||||||
|
Each Contributor must identify itself as the originator of its Contribution,
|
||||||
|
if any, in a manner that reasonably allows subsequent Recipients to identify
|
||||||
|
the originator of the Contribution.
|
||||||
|
|
||||||
|
4. COMMERCIAL DISTRIBUTION
|
||||||
|
|
||||||
|
Commercial distributors of software may accept certain responsibilities with
|
||||||
|
respect to end users, business partners and the like. While this license is
|
||||||
|
intended to facilitate the commercial use of the Program, the Contributor
|
||||||
|
who includes the Program in a commercial product offering should do so in a
|
||||||
|
manner which does not create potential liability for other Contributors.
|
||||||
|
Therefore, if a Contributor includes the Program in a commercial product
|
||||||
|
offering, such Contributor ("Commercial Contributor") hereby agrees to
|
||||||
|
defend and indemnify every other Contributor ("Indemnified Contributor")
|
||||||
|
against any losses, damages and costs (collectively "Losses") arising from
|
||||||
|
claims, lawsuits and other legal actions brought by a third party against
|
||||||
|
the Indemnified Contributor to the extent caused by the acts or omissions of
|
||||||
|
such Commercial Contributor in connection with its distribution of the
|
||||||
|
Program in a commercial product offering. The obligations in this section do
|
||||||
|
not apply to any claims or Losses relating to any actual or alleged
|
||||||
|
intellectual property infringement. In order to qualify, an Indemnified
|
||||||
|
Contributor must: a) promptly notify the Commercial Contributor in writing
|
||||||
|
of such claim, and b) allow the Commercial Contributor to control, and
|
||||||
|
cooperate with the Commercial Contributor in, the defense and any related
|
||||||
|
settlement negotiations. The Indemnified Contributor may participate in any
|
||||||
|
such claim at its own expense.
|
||||||
|
|
||||||
|
For example, a Contributor might include the Program in a commercial product
|
||||||
|
offering, Product X. That Contributor is then a Commercial Contributor. If
|
||||||
|
that Commercial Contributor then makes performance claims, or offers
|
||||||
|
warranties related to Product X, those performance claims and warranties are
|
||||||
|
such Commercial Contributor's responsibility alone. Under this section, the
|
||||||
|
Commercial Contributor would have to defend claims against the other
|
||||||
|
Contributors related to those performance claims and warranties, and if a
|
||||||
|
court requires any other Contributor to pay any damages as a result, the
|
||||||
|
Commercial Contributor must pay those damages.
|
||||||
|
|
||||||
|
5. NO WARRANTY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
|
||||||
|
AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
|
||||||
|
EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
|
||||||
|
CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the
|
||||||
|
appropriateness of using and distributing the Program and assumes all risks
|
||||||
|
associated with its exercise of rights under this Agreement , including but
|
||||||
|
not limited to the risks and costs of program errors, compliance with
|
||||||
|
applicable laws, damage to or loss of data, programs or equipment, and
|
||||||
|
unavailability or interruption of operations.
|
||||||
|
|
||||||
|
6. DISCLAIMER OF LIABILITY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||||
|
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
|
||||||
|
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||||
|
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
|
||||||
|
OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
7. GENERAL
|
||||||
|
|
||||||
|
If any provision of this Agreement is invalid or unenforceable under
|
||||||
|
applicable law, it shall not affect the validity or enforceability of the
|
||||||
|
remainder of the terms of this Agreement, and without further action by the
|
||||||
|
parties hereto, such provision shall be reformed to the minimum extent
|
||||||
|
necessary to make such provision valid and enforceable.
|
||||||
|
|
||||||
|
If Recipient institutes patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
||||||
|
(excluding combinations of the Program with other software or hardware)
|
||||||
|
infringes such Recipient's patent(s), then such Recipient's rights granted
|
||||||
|
under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||||
|
|
||||||
|
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||||
|
comply with any of the material terms or conditions of this Agreement and
|
||||||
|
does not cure such failure in a reasonable period of time after becoming
|
||||||
|
aware of such noncompliance. If all Recipient's rights under this Agreement
|
||||||
|
terminate, Recipient agrees to cease use and distribution of the Program as
|
||||||
|
soon as reasonably practicable. However, Recipient's obligations under this
|
||||||
|
Agreement and any licenses granted by Recipient relating to the Program
|
||||||
|
shall continue and survive.
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute copies of this Agreement, but
|
||||||
|
in order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||||
|
modified in the following manner. The Agreement Steward reserves the right
|
||||||
|
to publish new versions (including revisions) of this Agreement from time to
|
||||||
|
time. No one other than the Agreement Steward has the right to modify this
|
||||||
|
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
|
||||||
|
Eclipse Foundation may assign the responsibility to serve as the Agreement
|
||||||
|
Steward to a suitable separate entity. Each new version of the Agreement
|
||||||
|
will be given a distinguishing version number. The Program (including
|
||||||
|
Contributions) may always be distributed subject to the version of the
|
||||||
|
Agreement under which it was received. In addition, after a new version of
|
||||||
|
the Agreement is published, Contributor may elect to distribute the Program
|
||||||
|
(including its Contributions) under the new version. Except as expressly
|
||||||
|
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
|
||||||
|
licenses to the intellectual property of any Contributor under this
|
||||||
|
Agreement, whether expressly, by implication, estoppel or otherwise. All
|
||||||
|
rights in the Program not expressly granted under this Agreement are
|
||||||
|
reserved.
|
||||||
|
|
||||||
|
This Agreement is governed by the laws of the State of New York and the
|
||||||
|
intellectual property laws of the United States of America. No party to this
|
||||||
|
Agreement will bring a legal action under this Agreement more than one year
|
||||||
|
after the cause of action arose. Each party waives its rights to a jury
|
||||||
|
trial in any resulting litigation.
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:fedd8f2100f784dbcf60b1b6392d61c10902aaf2ff61a34134cd1ba83f4d2e11
|
|
||||||
size 297404
|
|
3
INIT.2012-02-29.tar.bz2
Normal file
3
INIT.2012-02-29.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f60890b21701470900a61961a77743f8671b4ac5c4939ae4c7baf6a97a1a52b2
|
||||||
|
size 299600
|
7
Warning
7
Warning
@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
GPL 1.0/2.0 versus CPL1.0
|
GPL 1.0/2.0 versus CPL1.0 as well as versus EPL1.0
|
||||||
=========================
|
==================================================
|
||||||
|
|
||||||
According to http://www.gnu.org/licenses/license-list.html
|
According to http://www.gnu.org/licenses/license-list.html
|
||||||
the current CPL-1.0 is incompatible with the GPL.
|
the current CPL-1.0 as well as EPL-1.0 is incompatible with
|
||||||
|
the GPL.
|
||||||
|
|
||||||
Therefore no developer should use the libraries provided
|
Therefore no developer should use the libraries provided
|
||||||
by the ksh in any project under the GPL.
|
by the ksh in any project under the GPL.
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2711f072573a7e69746fe8a1e88a72978e37b3b3097ff921aa6f23b624e76925
|
|
||||||
size 6377383
|
|
3
ast-base.2012-02-29.tar.bz2
Normal file
3
ast-base.2012-02-29.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:77e138e0fffeb21a2cf0aaa7c1cc4400870bf017812d8745b9da7a9432a9351f
|
||||||
|
size 8022544
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:334fc6d4e407cc8c9ffbcc6b4efdb3bb94da045126d608b7329f23b022f389de
|
|
||||||
size 1575644
|
|
43
ksh.changes
43
ksh.changes
@ -1,3 +1,46 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 15 12:32:36 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
- Port and readd memory leak patch to put_ifs() of sh/init.c
|
||||||
|
- Make sigexec more smart to help the pty helper binary to work as
|
||||||
|
this helper is used in the test suite
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 14 11:58:12 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
- Update to 2012-02-29 of ksh93u+ for final version
|
||||||
|
12-02-29 A bug which could lead to a core dump when more that four shared
|
||||||
|
libraries were added with the builtin command has been fixed.
|
||||||
|
12-02-29 Fixed a few bugs which caused SIGCHLD to be blocked preventing
|
||||||
|
background jobs from being reaped until a foreground job was run.
|
||||||
|
12-02-27 A bug in which sh -c for a simple command caused a fork() has been
|
||||||
|
fixed.
|
||||||
|
12-02-27 A timing bug on systems such as AIX that doesn't support vfork()
|
||||||
|
that could cause the exist status to get lost has been fixed.
|
||||||
|
12-02-22 A private file descriptor that was not close-on-exec for a command
|
||||||
|
substitution and has been fixed.
|
||||||
|
pty:
|
||||||
|
12-02-28 pty.c: change --verbose[=level] to --debug=level
|
||||||
|
|
||||||
|
libast:
|
||||||
|
12-03-10 misc/optget.c: HELP_index for "PLUGIN" too
|
||||||
|
12-02-29 include/shcmd.h: PLUGIN_VERSION 20111111 for cdt disc/meth change
|
||||||
|
12-02-29 comp/spawnveg.c: fix sigcritical() to include waitpid() for internal child
|
||||||
|
12-02-29 malloc.c: make __malloc_hook initialization thread safe
|
||||||
|
12-02-24 comp/iconv.c: fix winix UTF-8 vs UCS-2 over-conversion
|
||||||
|
12-02-24 astsa/*.h: clean up header guards
|
||||||
|
12-02-24 astsa/astsa.omk: clean up standalone old make makefile interactions
|
||||||
|
12-02-21 misc/cmdarg.c: fix bug that set argv[0]
|
||||||
|
|
||||||
|
libcoshell:
|
||||||
|
12-02-22 coinit.c: handle non-identifier export var names
|
||||||
|
|
||||||
|
libpp:
|
||||||
|
12-02-29 pp.probe: handle predefined function-like macro definitions
|
||||||
|
|
||||||
|
libsum:
|
||||||
|
12-02-29 sum-sha2.c: bitcount[] order reversed to allow a single noalias buffer copy
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 27 15:24:02 UTC 2012 - werner@suse.de
|
Mon Feb 27 15:24:02 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
57
ksh.spec
57
ksh.spec
@ -15,11 +15,9 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
|
|
||||||
Name: ksh
|
Name: ksh
|
||||||
%global date 2012-02-14
|
%global date 2012-02-29
|
||||||
%global use_suid_exe 0
|
%global use_suid_exe 0
|
||||||
%if %suse_version > 1210
|
%if %suse_version > 1210
|
||||||
%global use_opt_bins 1
|
%global use_opt_bins 1
|
||||||
@ -32,9 +30,19 @@ Name: ksh
|
|||||||
%global do_tests 0
|
%global do_tests 0
|
||||||
%endif
|
%endif
|
||||||
%global use_locale 0
|
%global use_locale 0
|
||||||
BuildRequires: bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
|
BuildRequires: bind-utils
|
||||||
|
BuildRequires: bison
|
||||||
|
BuildRequires: flex
|
||||||
|
BuildRequires: gdbm-devel
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: procps
|
||||||
|
BuildRequires: psmisc
|
||||||
|
BuildRequires: pwdutils
|
||||||
|
BuildRequires: zlib-devel
|
||||||
%if %suse_version > 1020
|
%if %suse_version > 1020
|
||||||
BuildRequires: bind-libs libbz2-devel
|
BuildRequires: bind-libs
|
||||||
|
BuildRequires: libbz2-devel
|
||||||
%endif
|
%endif
|
||||||
%if %suse_version > 1120
|
%if %suse_version > 1120
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
@ -45,8 +53,6 @@ BuildRequires: ed
|
|||||||
BuildRequires: strace
|
BuildRequires: strace
|
||||||
BuildRequires: vim
|
BuildRequires: vim
|
||||||
Url: http://www.research.att.com/~gsf/download/
|
Url: http://www.research.att.com/~gsf/download/
|
||||||
License: CPL-1.0
|
|
||||||
Group: System/Shells
|
|
||||||
Requires(post): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
Requires(post): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
||||||
Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
||||||
%if %suse_version > 1120
|
%if %suse_version > 1120
|
||||||
@ -56,14 +62,15 @@ Requires(preun): update-alternatives
|
|||||||
%if %use_suid_exe
|
%if %use_suid_exe
|
||||||
PreReq: permissions
|
PreReq: permissions
|
||||||
%endif
|
%endif
|
||||||
AutoReqProv: on
|
|
||||||
Version: 93u
|
Version: 93u
|
||||||
Release: 1
|
Release: 0
|
||||||
Summary: Korn Shell
|
Summary: Korn Shell
|
||||||
|
License: CPL-1.0 ; EPL-1.0
|
||||||
|
Group: System/Shells
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source: INIT.%{date}.tar.bz2
|
Source: INIT.%{date}.tar.bz2
|
||||||
Source1: ast-ksh.%{date}.tar.bz2
|
Source1: ast-base.%{date}.tar.bz2
|
||||||
Source2: ast-base.%{date}.tar.bz2
|
Source3: EPL
|
||||||
Source4: CPL
|
Source4: CPL
|
||||||
Source10: leak1.sh
|
Source10: leak1.sh
|
||||||
Source11: leak2.sh
|
Source11: leak2.sh
|
||||||
@ -100,7 +107,7 @@ Patch21: ksh93-vm.dif
|
|||||||
Patch22: ksh93-limit-name-len.dif
|
Patch22: ksh93-limit-name-len.dif
|
||||||
Patch23: ksh93-foreground-prgrp.dif
|
Patch23: ksh93-foreground-prgrp.dif
|
||||||
Patch24: ksh93-builtin.dif
|
Patch24: ksh93-builtin.dif
|
||||||
Patch25: ksh93-twelve-cloexec.dif
|
Patch25: ksh93-vmleak.dif
|
||||||
Patch42: ksh-locale.patch
|
Patch42: ksh-locale.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -117,11 +124,10 @@ Authors:
|
|||||||
Phong Vo <kpv@research.att.com>
|
Phong Vo <kpv@research.att.com>
|
||||||
|
|
||||||
%package -n ksh-devel
|
%package -n ksh-devel
|
||||||
License: CPL-1.0
|
|
||||||
Summary: Korn Shell development environment
|
Summary: Korn Shell development environment
|
||||||
|
License: CPL-1.0
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: ksh = %{version}-%{release}
|
Requires: ksh = %{version}-%{release}
|
||||||
AutoReqProv: on
|
|
||||||
|
|
||||||
%description -n ksh-devel
|
%description -n ksh-devel
|
||||||
The package includes C header files and the static libraries together
|
The package includes C header files and the static libraries together
|
||||||
@ -139,8 +145,11 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
chmod +x %{S:31}
|
chmod +x %{S:31}
|
||||||
%setup -q -n ksh93 -T -c -a 0 -a 1
|
%setup -q -n ksh93 -T -c -a 0
|
||||||
tar --use-compress-program=bzcat -xf %{S:2} src/cmd/builtin/ src/cmd/msgcc/ src/lib/libpp/ src/lib/libuu/
|
tar --use-compress-program=bzcat -xf %{S:1} \
|
||||||
|
lib/package/ \
|
||||||
|
src/cmd/ksh93/ src/lib/libast/ src/lib/libcmd/ src/lib/libcoshell/ src/lib/libdll/ src/lib/libsum/ \
|
||||||
|
src/cmd/builtin/ src/cmd/msgcc/ src/lib/libpp/ src/lib/libuu/
|
||||||
if test -d share ; then
|
if test -d share ; then
|
||||||
find share/ \( -name chef -o -name fudd -o -name piglatin -o -name valley \) -a -type d |\
|
find share/ \( -name chef -o -name fudd -o -name piglatin -o -name valley \) -a -type d |\
|
||||||
xargs -r rm -vrf
|
xargs -r rm -vrf
|
||||||
@ -187,18 +196,22 @@ fi
|
|||||||
#
|
#
|
||||||
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
|
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
|
||||||
typeset -i SIGMASK=0x0
|
typeset -i SIGMASK=0x0
|
||||||
|
typeset -i usesigexec=0
|
||||||
|
|
||||||
let "SIGMASK|=(1<<($(kill -l PIPE)-1))"
|
let "SIGMASK|=(1<<($(kill -l PIPE)-1))"
|
||||||
let "SIGMASK|=(1<<($(kill -l URG) -1))"
|
let "SIGMASK|=(1<<($(kill -l URG) -1))"
|
||||||
let "SIGMASK|=(1<<($(kill -l XFSZ)-1))"
|
let "SIGMASK|=(1<<($(kill -l XFSZ)-1))"
|
||||||
|
|
||||||
if ((IGNORED & SIGMASK)) ; then
|
((IGNORED & SIGMASK)) && let ++usesigexec || true
|
||||||
|
test -t 0 || let ++usesigexec
|
||||||
|
|
||||||
|
if ((usesigexec > 0)) ; then
|
||||||
${CC:-gcc} ${RPM_OPT_FLAGS} -o sigexec %{S:42} -lutil
|
${CC:-gcc} ${RPM_OPT_FLAGS} -o sigexec %{S:42} -lutil
|
||||||
for fd in /proc/$$/fd/*; do
|
for fd in /proc/$$/fd/*; do
|
||||||
test -s $fd -a ! -c $fd && break || true
|
test -s $fd -a ! -c $fd && break || true
|
||||||
done
|
done
|
||||||
set -- $(readlink $fd)
|
set -- $(readlink $fd)
|
||||||
exec -a $SHELL ./sigexec $SHELL ${1+"$@"}
|
exec ./sigexec $SHELL ${1+"$@"}
|
||||||
fi
|
fi
|
||||||
IGNORED=0x$(ps --no-headers -o ignored $$)
|
IGNORED=0x$(ps --no-headers -o ignored $$)
|
||||||
|
|
||||||
@ -628,7 +641,9 @@ fi
|
|||||||
if test -s lib/package/LICENSES/ast ; then
|
if test -s lib/package/LICENSES/ast ; then
|
||||||
cp lib/package/LICENSES/ast LICENSE
|
cp lib/package/LICENSES/ast LICENSE
|
||||||
else
|
else
|
||||||
cp %{S:4} LICENSE
|
cp %{S:3} EPL-1.0
|
||||||
|
cp %{S:4} CPL-1.0
|
||||||
|
ln -sf EPL-v1.0 LICENSE
|
||||||
fi
|
fi
|
||||||
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
|
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
|
||||||
echo '.VERBON 22' > grep.mm
|
echo '.VERBON 22' > grep.mm
|
||||||
@ -723,7 +738,7 @@ fi
|
|||||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh
|
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh
|
||||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh.paranoid
|
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh.paranoid
|
||||||
%endif
|
%endif
|
||||||
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
%doc LICENSE EPL-1.0 CPL-1.0 src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
||||||
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
||||||
/bin/ksh93
|
/bin/ksh93
|
||||||
%ghost %verify(not link) /bin/ksh
|
%ghost %verify(not link) /bin/ksh
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- src/lib/libpp/ppsearch.c
|
--- src/lib/libpp/ppsearch.c
|
||||||
+++ src/lib/libpp/ppsearch.c 2011-07-12 12:08:08.640426463 +0000
|
+++ src/lib/libpp/ppsearch.c 2012-03-14 11:40:10.953934666 +0000
|
||||||
@@ -107,6 +107,14 @@ ppmultiple(register struct ppfile* fp, r
|
@@ -107,6 +107,14 @@ ppmultiple(register struct ppfile* fp, r
|
||||||
* search for file using directories in dp
|
* search for file using directories in dp
|
||||||
*/
|
*/
|
||||||
@ -19,9 +19,9 @@
|
|||||||
(fp->flags & INC_BOUND(INC_STANDARD)) ? "STANDARD|" : "",
|
(fp->flags & INC_BOUND(INC_STANDARD)) ? "STANDARD|" : "",
|
||||||
dp ? (dp->index == INC_PREFIX ? "pre" : dp->index == INC_LOCAL ? "lcl" : dp->index == INC_VENDOR ? "vnd" : "std") : NiL,
|
dp ? (dp->index == INC_PREFIX ? "pre" : dp->index == INC_LOCAL ? "lcl" : dp->index == INC_VENDOR ? "vnd" : "std") : NiL,
|
||||||
dp ? dp->name : NiL,
|
dp ? dp->name : NiL,
|
||||||
- !(fp->flags & INC_MEMBER(INC_PREFIX)) && (xp = fp->bound[INC_PREFIX]) ? xp->name : NiL,
|
- !(fp->flags & INC_MEMBER(INC_PREFIX)) && fp->bound[INC_PREFIX] ? fp->bound[INC_PREFIX]->name : NiL,
|
||||||
- !(fp->flags & INC_MEMBER(INC_LOCAL)) && (xp = fp->bound[INC_LOCAL]) ? xp->name : NiL,
|
- !(fp->flags & INC_MEMBER(INC_LOCAL)) && fp->bound[INC_LOCAL] ? fp->bound[INC_LOCAL]->name : NiL,
|
||||||
- !(fp->flags & INC_MEMBER(INC_VENDOR)) && (xp = fp->bound[INC_VENDOR]) ? xp->name : NiL,
|
- !(fp->flags & INC_MEMBER(INC_VENDOR)) && fp->bound[INC_VENDOR] ? fp->bound[INC_VENDOR]->name : NiL,
|
||||||
- !(fp->flags & INC_MEMBER(INC_STANDARD)) && (xp = fp->bound[INC_STANDARD]) ? xp->name : NiL,
|
- !(fp->flags & INC_MEMBER(INC_STANDARD)) && (xp = fp->bound[INC_STANDARD]) ? xp->name : NiL,
|
||||||
+ stupidgcc(INC_PREFIX),
|
+ stupidgcc(INC_PREFIX),
|
||||||
+ stupidgcc(INC_LOCAL),
|
+ stupidgcc(INC_LOCAL),
|
||||||
|
@ -1,19 +1,6 @@
|
|||||||
--- src/cmd/ksh93/sh/lex.c
|
--- src/cmd/ksh93/sh/lex.c
|
||||||
+++ src/cmd/ksh93/sh/lex.c 2012-01-16 16:09:37.624771155 +0100
|
+++ src/cmd/ksh93/sh/lex.c 2012-01-16 16:09:37.624771155 +0100
|
||||||
@@ -1563,8 +1563,10 @@ static int comsub(register Lex_t *lp, in
|
@@ -1874,6 +1874,8 @@ static int here_copy(Lex_t *lp,register
|
||||||
if(endtok==LPAREN && lp->lexd.paren)
|
|
||||||
{
|
|
||||||
|
|
||||||
- if(first==lp->lexd.first)
|
|
||||||
- fcseek(cp+1-(char*)fcseek(0));
|
|
||||||
+ if(first==lp->lexd.first) {
|
|
||||||
+ const char *tp = (const char*)fcseek(0);
|
|
||||||
+ fcseek(cp+1-tp);
|
|
||||||
+ }
|
|
||||||
count++;
|
|
||||||
lp->lexd.paren = 0;
|
|
||||||
fcgetc(c);
|
|
||||||
@@ -1872,6 +1874,8 @@ static int here_copy(Lex_t *lp,register
|
|
||||||
sfputc(sp,'\\');
|
sfputc(sp,'\\');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
--- src/cmd/ksh93/sh/xec.c
|
|
||||||
+++ src/cmd/ksh93/sh/xec.c 2012-02-27 16:06:17.838506198 +0100
|
|
||||||
@@ -108,6 +108,7 @@ static void iousepipe(Shell_t *shp)
|
|
||||||
usepipe++;
|
|
||||||
fcntl(subpipe[0],F_SETFD,FD_CLOEXEC);
|
|
||||||
subpipe[2] = fcntl(1,F_DUPFD,10);
|
|
||||||
+ fcntl(subpipe[2],F_SETFD,FD_CLOEXEC);
|
|
||||||
shp->fdstatus[subpipe[2]] = shp->fdstatus[1];
|
|
||||||
close(1);
|
|
||||||
fcntl(subpipe[1],F_DUPFD,1);
|
|
44
ksh93-vmleak.dif
Normal file
44
ksh93-vmleak.dif
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
--- src/cmd/ksh93/sh/init.c
|
||||||
|
+++ src/cmd/ksh93/sh/init.c 2012-03-14 12:40:34.986162029 +0000
|
||||||
|
@@ -508,24 +508,26 @@ static void put_cdpath(register Namval_t
|
||||||
|
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
|
||||||
|
{
|
||||||
|
register struct ifs *ip = (struct ifs*)fp;
|
||||||
|
+ Namfun_t *xp;
|
||||||
|
ip->ifsnp = 0;
|
||||||
|
- if(!val)
|
||||||
|
- {
|
||||||
|
- fp = nv_stack(np, NIL(Namfun_t*));
|
||||||
|
- if(fp && !fp->nofree)
|
||||||
|
- {
|
||||||
|
- free((void*)fp);
|
||||||
|
- fp = 0;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- if(val != np->nvalue.cp)
|
||||||
|
- nv_putv(np, val, flags, fp);
|
||||||
|
- if(!val)
|
||||||
|
+ if(val)
|
||||||
|
{
|
||||||
|
- if(fp)
|
||||||
|
- fp->next = np->nvfun;
|
||||||
|
- np->nvfun = fp;
|
||||||
|
+ if(val != np->nvalue.cp)
|
||||||
|
+ nv_putv(np, val, flags, fp);
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
+ if((xp = nv_stack(np, NIL(Namfun_t*))) != fp)
|
||||||
|
+ sfprintf(sfstderr, "BUG in %s:%s(%d) xp(%p) != fp(%p)\n",
|
||||||
|
+ __FILE__, __FUNCTION__, __LINE__, xp, fp);
|
||||||
|
+ if(fp && !fp->nofree)
|
||||||
|
+ {
|
||||||
|
+ free((void*)fp);
|
||||||
|
+ fp = NIL(Namfun_t*);
|
||||||
|
+ }
|
||||||
|
+ nv_putv(np, NIL(char*), flags, fp);
|
||||||
|
+ if(fp)
|
||||||
|
+ fp->next = np->nvfun;
|
||||||
|
+ np->nvfun = fp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
80
ksh93.dif
80
ksh93.dif
@ -110,21 +110,6 @@
|
|||||||
to the standard input of the next command.
|
to the standard input of the next command.
|
||||||
Each command,
|
Each command,
|
||||||
except possibly the last,
|
except possibly the last,
|
||||||
--- src/cmd/ksh93/sh/lex.c
|
|
||||||
+++ src/cmd/ksh93/sh/lex.c 2010-08-17 14:49:14.000000000 +0000
|
|
||||||
@@ -1136,7 +1136,11 @@ int sh_lex(Lex_t* lp)
|
|
||||||
if(!(state=lp->lexd.first))
|
|
||||||
state = fcfirst();
|
|
||||||
else
|
|
||||||
- fcseek(state-fcseek(0));
|
|
||||||
+ {
|
|
||||||
+ register const char * cp;
|
|
||||||
+ cp = fcseek(0);
|
|
||||||
+ fcseek(state-cp);
|
|
||||||
+ }
|
|
||||||
lp->lexd.paren = 1;
|
|
||||||
}
|
|
||||||
return(lp->token=LPAREN);
|
|
||||||
--- src/cmd/ksh93/sh/main.c
|
--- src/cmd/ksh93/sh/main.c
|
||||||
+++ src/cmd/ksh93/sh/main.c 2007-12-20 18:01:26.000000000 +0000
|
+++ src/cmd/ksh93/sh/main.c 2007-12-20 18:01:26.000000000 +0000
|
||||||
@@ -130,9 +130,9 @@ int sh_source(Shell_t *shp, Sfio_t *iop,
|
@@ -130,9 +130,9 @@ int sh_source(Shell_t *shp, Sfio_t *iop,
|
||||||
@ -356,24 +341,22 @@
|
|||||||
PATH=$path
|
PATH=$path
|
||||||
|
|
||||||
--- src/cmd/ksh93/tests/pty.sh
|
--- src/cmd/ksh93/tests/pty.sh
|
||||||
+++ src/cmd/ksh93/tests/pty.sh 2012-02-20 13:49:24.729935773 +0000
|
+++ src/cmd/ksh93/tests/pty.sh 2012-03-15 11:51:40.018434039 +0000
|
||||||
@@ -419,16 +419,16 @@ r echo repeat-3
|
@@ -428,15 +428,16 @@ r echo repeat-3
|
||||||
!
|
|
||||||
|
|
||||||
# err_exit #
|
# err_exit #
|
||||||
-whence -q less &&
|
whence -q less &&
|
||||||
+whence -q more &&
|
-TERM=vt100 tst $LINENO <<"!"
|
||||||
TERM=vt100 tst $LINENO <<"!"
|
+TERM=xterm tst $LINENO <<"!"
|
||||||
L ksh process/terminal group exercise
|
L process/terminal group exercise
|
||||||
|
|
||||||
-w while :; do echo y; done | less
|
-w m=yes; while true; do echo $m-$m; done | less
|
||||||
-u ^:\E
|
+w m=yes; while true; do echo $m-$m; done | less -b1 -c
|
||||||
+w while :; do echo y; done | more
|
u :$|:\E|lines
|
||||||
+u --More--
|
|
||||||
c \cZ
|
c \cZ
|
||||||
r Stopped
|
r Stopped
|
||||||
w fg
|
w fg
|
||||||
-u ^:\E
|
u yes-yes
|
||||||
+w q
|
+w q
|
||||||
!
|
!
|
||||||
|
|
||||||
@ -520,46 +503,3 @@
|
|||||||
|
|
||||||
typedef struct State_s
|
typedef struct State_s
|
||||||
{
|
{
|
||||||
--- src/cmd/ksh93/sh/init.c
|
|
||||||
+++ src/cmd/ksh93/sh/init.c 2012-02-20 10:33:24.362018545 +0000
|
|
||||||
@@ -508,25 +508,26 @@ static void put_cdpath(register Namval_t
|
|
||||||
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
|
|
||||||
{
|
|
||||||
register struct ifs *ip = (struct ifs*)fp;
|
|
||||||
+ Namfun_t *xp;
|
|
||||||
ip->ifsnp = 0;
|
|
||||||
- if(!val)
|
|
||||||
+ if(val)
|
|
||||||
{
|
|
||||||
- fp = nv_stack(np, NIL(Namfun_t*));
|
|
||||||
- if(fp && !fp->nofree)
|
|
||||||
- {
|
|
||||||
- free((void*)fp);
|
|
||||||
- fp = 0;
|
|
||||||
- }
|
|
||||||
+ if(val != np->nvalue.cp)
|
|
||||||
+ nv_putv(np, val, flags, fp);
|
|
||||||
+ return;
|
|
||||||
}
|
|
||||||
- if(val != np->nvalue.cp)
|
|
||||||
- nv_putv(np, val, flags, fp);
|
|
||||||
- if(!val)
|
|
||||||
+ if((xp = nv_stack(np, NIL(Namfun_t*))) != fp)
|
|
||||||
+ sfprintf(sfstderr, "BUG in %s:%s(%d) xp(%p) != fp(%p)\n",
|
|
||||||
+ __FILE__, __FUNCTION__, __LINE__, xp, fp);
|
|
||||||
+ if(fp && !fp->nofree)
|
|
||||||
{
|
|
||||||
- fp->next = np->nvfun;
|
|
||||||
- np->nvfun = fp;
|
|
||||||
+ free((void*)fp);
|
|
||||||
+ fp = NIL(Namfun_t*);
|
|
||||||
}
|
|
||||||
- else if(!val)
|
|
||||||
- np->nvfun = 0;
|
|
||||||
+ nv_putv(np, NIL(char*), flags, fp);
|
|
||||||
+ if(fp)
|
|
||||||
+ fp->next = np->nvfun;
|
|
||||||
+ np->nvfun = fp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
64
sigexec.c
64
sigexec.c
@ -45,7 +45,7 @@ int main(int argc, char* argv[])
|
|||||||
ssize_t len;
|
ssize_t len;
|
||||||
static struct termios o;
|
static struct termios o;
|
||||||
static struct winsize w;
|
static struct winsize w;
|
||||||
char ptsname[NAME_MAX+1];
|
char devname[NAME_MAX+1];
|
||||||
char buffer[65536];
|
char buffer[65536];
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
@ -56,16 +56,59 @@ int main(int argc, char* argv[])
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
}
|
}
|
||||||
if (tcgetattr(0, &o) < 0) {
|
if (tcgetattr(0, &o) < 0) {
|
||||||
cfmakeraw(&o);
|
|
||||||
cfsetispeed(&o, B38400);
|
cfsetispeed(&o, B38400);
|
||||||
cfsetospeed(&o, B38400);
|
cfsetospeed(&o, B38400);
|
||||||
}
|
}
|
||||||
o.c_lflag &= ~ECHO;
|
|
||||||
o.c_lflag |= ISIG;
|
|
||||||
o.c_cc[VTIME] = 0;
|
|
||||||
o.c_cc[VMIN] = CMIN;
|
|
||||||
|
|
||||||
if (openpty(&ptm, &pts, ptsname, &o, &w) < 0)
|
o.c_iflag = TTYDEF_IFLAG;
|
||||||
|
o.c_oflag = TTYDEF_OFLAG;
|
||||||
|
o.c_lflag = TTYDEF_LFLAG;
|
||||||
|
# ifdef CBAUD
|
||||||
|
o.c_lflag &= ~CBAUD;
|
||||||
|
# endif
|
||||||
|
o.c_cflag = B38400;
|
||||||
|
o.c_cflag |= TTYDEF_CFLAG;
|
||||||
|
|
||||||
|
/* Sane setting, allow eight bit characters, no carriage return delay
|
||||||
|
* the same result as `stty sane cr0 pass8'
|
||||||
|
*/
|
||||||
|
o.c_iflag |= (BRKINT | ICRNL | IMAXBEL);
|
||||||
|
o.c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | INPCK | ISTRIP);
|
||||||
|
o.c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
|
||||||
|
o.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\
|
||||||
|
NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
|
||||||
|
o.c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE);
|
||||||
|
o.c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | XCASE | TOSTOP);
|
||||||
|
o.c_cflag |= (CREAD | CS8 | HUPCL);
|
||||||
|
o.c_cflag &= ~(PARODD | PARENB);
|
||||||
|
/*
|
||||||
|
* VTIME and VMIN can overlap with VEOF and VEOL since they are
|
||||||
|
* only used for non-canonical mode. We just set the at the
|
||||||
|
* beginning, so nothing bad should happen.
|
||||||
|
*/
|
||||||
|
o.c_cc[VTIME] = 0;
|
||||||
|
o.c_cc[VMIN] = CMIN;
|
||||||
|
o.c_cc[VINTR] = CINTR;
|
||||||
|
o.c_cc[VQUIT] = CQUIT;
|
||||||
|
o.c_cc[VERASE] = CERASE; /* ASCII DEL (0177) */
|
||||||
|
o.c_cc[VKILL] = CKILL;
|
||||||
|
o.c_cc[VEOF] = CEOF;
|
||||||
|
# ifdef VSWTC
|
||||||
|
o.c_cc[VSWTC] = _POSIX_VDISABLE;
|
||||||
|
# else
|
||||||
|
o.c_cc[VSWTCH] = _POSIX_VDISABLE;
|
||||||
|
# endif
|
||||||
|
o.c_cc[VSTART] = CSTART;
|
||||||
|
o.c_cc[VSTOP] = CSTOP;
|
||||||
|
o.c_cc[VSUSP] = CSUSP;
|
||||||
|
o.c_cc[VEOL] = _POSIX_VDISABLE;
|
||||||
|
o.c_cc[VREPRINT] = CREPRINT;
|
||||||
|
o.c_cc[VDISCARD] = CDISCARD;
|
||||||
|
o.c_cc[VWERASE] = CWERASE;
|
||||||
|
o.c_cc[VLNEXT] = CLNEXT;
|
||||||
|
o.c_cc[VEOL2] = _POSIX_VDISABLE;
|
||||||
|
|
||||||
|
if (openpty(&ptm, &pts, devname, &o, &w) < 0)
|
||||||
perror("pty: can not open pty/tty pair");
|
perror("pty: can not open pty/tty pair");
|
||||||
|
|
||||||
(void)sigemptyset(&set);
|
(void)sigemptyset(&set);
|
||||||
@ -100,11 +143,12 @@ int main(int argc, char* argv[])
|
|||||||
ioctl(1, TIOCNOTTY);
|
ioctl(1, TIOCNOTTY);
|
||||||
if (setsid() < 0)
|
if (setsid() < 0)
|
||||||
perror("pty: can not get controlling tty");
|
perror("pty: can not get controlling tty");
|
||||||
|
dup2(pts, 0);
|
||||||
dup2(pts, 1);
|
dup2(pts, 1);
|
||||||
dup2(pts, 2);
|
dup2(pts, 2);
|
||||||
close(pts);
|
close(pts);
|
||||||
close(ptm);
|
close(ptm);
|
||||||
if (ioctl (1, TIOCSCTTY, 1) < 0)
|
if (ioctl (0, TIOCSCTTY, 1) < 0)
|
||||||
perror("pty: can not get controlling tty");
|
perror("pty: can not get controlling tty");
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
@ -149,6 +193,7 @@ int main(int argc, char* argv[])
|
|||||||
sigemptyset (&sa.sa_mask);
|
sigemptyset (&sa.sa_mask);
|
||||||
|
|
||||||
sigaction(SIGHUP, &sa, (struct sigaction*)0);
|
sigaction(SIGHUP, &sa, (struct sigaction*)0);
|
||||||
|
sigaction(SIGINT, &sa, (struct sigaction*)0);
|
||||||
sigaction(SIGPIPE, &sa, (struct sigaction*)0);
|
sigaction(SIGPIPE, &sa, (struct sigaction*)0);
|
||||||
sigaction(SIGTERM, &sa, (struct sigaction*)0);
|
sigaction(SIGTERM, &sa, (struct sigaction*)0);
|
||||||
sigaction(SIGURG, &sa, (struct sigaction*)0);
|
sigaction(SIGURG, &sa, (struct sigaction*)0);
|
||||||
@ -156,8 +201,7 @@ int main(int argc, char* argv[])
|
|||||||
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
||||||
|
|
||||||
sa.sa_handler = SIG_IGN;
|
sa.sa_handler = SIG_IGN;
|
||||||
sigaction(SIGINT, &sa, (struct sigaction*)0);
|
|
||||||
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
||||||
|
|
||||||
return execv(argv[0], &argv[1]);
|
return execv(argv[1], &argv[1]);
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
make shell
|
make shell
|
||||||
prev libshell.a archive
|
prev libshell.a archive
|
||||||
--- src/lib/libast/Mamfile
|
--- src/lib/libast/Mamfile
|
||||||
+++ src/lib/libast/Mamfile 2012-02-20 12:00:37.157934600 +0100
|
+++ src/lib/libast/Mamfile 2012-03-14 11:36:06.073934348 +0000
|
||||||
@@ -5,7 +5,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
@@ -5,7 +5,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||||
setv ARFLAGS rc
|
setv ARFLAGS rc
|
||||||
setv AS as
|
setv AS as
|
||||||
@ -168,7 +168,7 @@
|
|||||||
done lcgen generated
|
done lcgen generated
|
||||||
make port/lc.tab
|
make port/lc.tab
|
||||||
done port/lc.tab
|
done port/lc.tab
|
||||||
@@ -7280,65 +7280,38 @@ done ${INSTALLROOT}/lib/file/magic gener
|
@@ -7282,64 +7282,37 @@ done ${INSTALLROOT}/lib/file/magic gener
|
||||||
make ${INSTALLROOT}/include/ast/fmtmsg.h
|
make ${INSTALLROOT}/include/ast/fmtmsg.h
|
||||||
prev comp/fmtmsg.h
|
prev comp/fmtmsg.h
|
||||||
prev ast_lib.h
|
prev ast_lib.h
|
||||||
@ -189,8 +189,7 @@
|
|||||||
exec - }
|
exec - }
|
||||||
-exec - ;;
|
-exec - ;;
|
||||||
-exec - esac
|
-exec - esac
|
||||||
make ${INSTALLROOT}/include/prototyped.h implicit
|
prev ${INSTALLROOT}/include/prototyped.h implicit
|
||||||
done ${INSTALLROOT}/include/prototyped.h dontcare
|
|
||||||
done ${INSTALLROOT}/include/ast/fmtmsg.h generated
|
done ${INSTALLROOT}/include/ast/fmtmsg.h generated
|
||||||
make ${INSTALLROOT}/include/ast/libgen.h
|
make ${INSTALLROOT}/include/ast/libgen.h
|
||||||
prev comp/libgen.h
|
prev comp/libgen.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user