opnsense-src/sys/compat/svr4
Konstantin Belousov b4490c6e93 The si_status field of the siginfo_t, provided by the waitid(2) and
SIGCHLD signal, should keep full 32 bits of the status passed to the
_exit(2).

Split the combined p_xstat of the struct proc into the separate exit
status p_xexit for normal process exit, and signalled termination
information p_xsig.  Kernel-visible macro KW_EXITCODE() reconstructs
old p_xstat from p_xexit and p_xsig.  p_xexit contains complete status
and copied out into si_status.

Requested by:	Joerg Schilling
Reviewed by:	jilles (previous version), pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2015-07-18 09:02:50 +00:00
..
imgact_svr4.c Implement lockless resource limits. 2015-06-10 10:48:12 +00:00
Makefile Housekeeping. Update for maintainers who have handed in their commit bits 2006-07-01 10:51:55 +00:00
README These don't belong in the modules directory. 2014-11-06 16:52:51 +00:00
svr4.h - Stop hardcoding #define's for options and use the appropriate 2005-07-13 15:14:33 +00:00
svr4_acl.h
svr4_dirent.h
svr4_errno.h
svr4_exec.h
svr4_fcntl.c Remove the no-at variants of the kern_xx() syscall helpers. E.g., we 2014-11-13 18:01:51 +00:00
svr4_fcntl.h
svr4_filio.c Update kernel inclusions of capability.h to use capsicum.h instead; some 2014-03-16 10:55:57 +00:00
svr4_filio.h
svr4_fuser.h Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
svr4_hrt.h
svr4_ioctl.c Update kernel inclusions of capability.h to use capsicum.h instead; some 2014-03-16 10:55:57 +00:00
svr4_ioctl.h Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
svr4_ipc.c Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
svr4_ipc.h
svr4_misc.c The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
svr4_mman.h
svr4_proto.h Regenerate system call tables. 2011-11-19 06:36:11 +00:00
svr4_resource.c Implement lockless resource limits. 2015-06-10 10:48:12 +00:00
svr4_resource.h Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
svr4_siginfo.h Fix compiling problem by adding prefix name svr4 to si_xxx macro, the 2005-10-19 09:33:15 +00:00
svr4_signal.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
svr4_signal.h 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
svr4_socket.c Adjust printf format specifiers for dev_t and ino_t in kernel. 2014-12-17 07:27:19 +00:00
svr4_socket.h Clean up the svr4 socket cache and streams code some to make it more easily 2006-07-21 20:40:13 +00:00
svr4_sockio.c Fix build. 2013-11-05 19:17:19 +00:00
svr4_sockio.h
svr4_sockmod.h
svr4_stat.c Remove the no-at variants of the kern_xx() syscall helpers. E.g., we 2014-11-13 18:01:51 +00:00
svr4_stat.h
svr4_statvfs.h
svr4_stream.c fd: remove filedesc argument from fdclose 2015-04-11 15:40:28 +00:00
svr4_stropts.h - Explicitly lock Giant to protect the fields in the svr4_strm structure 2006-07-28 16:56:17 +00:00
svr4_syscall.h Regenerate system call tables. 2011-11-19 06:36:11 +00:00
svr4_syscallnames.c Regenerate system call tables. 2011-11-19 06:36:11 +00:00
svr4_sysconfig.h Add new sysconfig bits, Fix the bogus numbering of the old bits. 2009-05-29 05:37:27 +00:00
svr4_sysent.c Regenerate system call tables. 2011-11-19 06:36:11 +00:00
svr4_systeminfo.h
svr4_sysvec.c svr4 emulator has custom sendsig() implementation, it does not use 2015-06-29 10:33:04 +00:00
svr4_termios.c Include <sys/tty.h> instead of <sys/termios.h>. 2009-11-28 16:30:06 +00:00
svr4_termios.h
svr4_time.h
svr4_timod.h
svr4_types.h Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
svr4_ucontext.h
svr4_ulimit.h
svr4_ustat.h
svr4_util.h - Split out kern_accept(), kern_getpeername(), and kern_getsockname() for 2006-07-10 21:38:17 +00:00
svr4_utsname.h
svr4_wait.h
syscalls.conf - Remove unused sysvec variables from various syscalls.conf. 2006-08-15 17:25:55 +00:00
syscalls.master Improve *access*() parameter name consistency. 2011-11-19 06:35:15 +00:00
TO-DO These don't belong in the modules directory. 2014-11-06 16:52:51 +00:00

This is a SysVR4 emulator derived from work done as part of the NetBSD
Project by Christos Zoulas.  It has been ported to FreeBSD by Mark Newton.

To use it:

1.  Choose one of:
      a.  Add "device streams" to your kernel config file and rebuild,
          reboot; or
      b.  Build and install the streams module in /sys/modules/streams

2.  Build and install the svr4 module in /sys/modules/svr4

3.  Type "kldload svr4" to start it up.

4.  Grab compat_sol26.tar.gz or compat_svr4.tar.gz from
    http://www.freebsd.org/~newton/freebsd-svr4 and install them in
    /compat/svr4

5.  Run "sh SVR4_MAKEDEV all" in /compat/svr4/dev

6.  Mount a Solaris/x86 v2.6 or v7 CD-ROM on /cdrom (also works with 
    v2.4 and v2.5.1, but you need different symlinks in /compat/svr4)

7.  Brand any executables you want to run, and/or set the
    kern.fallback_elf_brand sysctl to 'SVR4' to establish this as the
    default emulator for unbranded executables.

8.  See if your SysVR4 programs work.

It's early days yet, folks -- You'll probably have trouble getting 100%
functionality out of most things (specifically, poll() on a socket doesn't
look like it works at the moment, so Netscape doesn't work (among other
things)).  Patches will be appreciated.

   - Mark Newton
     newton@atdot.dotat.org

$FreeBSD$