Commit Graph

66 Commits

Author SHA1 Message Date
mycroft
fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
rvb
26b955eec7 ufs_readdir no longer checks if vp->v_type != VDIR so
the individual emulated readdirs must check.
Since netbsd and freebsd return EINVAL for the error
and I don't know what the other platforms do, return
EINVAL for them too.
1998-09-08 20:02:51 +00:00
christos
e1f16dd0c9 Assign copyrights to TNF; tv has copyrights on the remaining files...
It would be nice if he changed them (hint, hint)
1998-09-04 19:54:37 +00:00
eeh
a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
perry
e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
thorpej
0e28b643e9 Use a pool for proc structures. 1998-08-02 04:41:32 +00:00
fvdl
a377495cfb Only free cookiebuf when sure that the vop actually allocated it. 1998-03-03 13:44:48 +00:00
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej
5f8168f660 Use the sesssion's stored SID in getsid(). 1998-02-14 01:33:18 +00:00
mrg
d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
mrg
1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
christos
6a9178e444 From Todd Vierling:
- Fix memcntl()
- Fixed stat and mknod syscalls to properly disassemble and reassemble
  dev_t values to/from emulation dev_t's
- Added pty (ptmx) subsystem at svr4net minor number 10 -- /dev/ptmx
- Implemented fork1() as fork() (should change if and when threads get
  added to the system)
- fixed spellings in disclaimer in svr4_net.c; it looks like someone went
  and did a s/nd/st/g on the whole file... yuck
- changed ptmx device to also halt on ENXIO (for pty files that exist with
  no kernel pty to back them)
- fixed SVR4 setpgrp() to be a near equivalent to BSD setsid() (old
  emulation didn't create a new session)
1997-11-16 22:50:55 +00:00
pk
1abecf9a70 Deal with svr4_ulimit() return values in the same way as in
compat_43_sys_setrlimit(). (takes care of PR#4418)

Also in svr4_ulimit(): return EINVAL for unknown commands, instead of ENOSYS.
1997-11-03 22:03:31 +00:00
christos
b08c2743e7 Put a noop stub for sys_auditsys 1997-10-28 18:58:17 +00:00
fvdl
b2d2f560e8 Fix another eofflag interpretation mistake that I missed when fixing
them.
1997-10-26 11:13:46 +00:00
fvdl
33074aa25a Eliminate compile warning because of mmap caddr_t -> void * change. 1997-10-19 00:16:08 +00:00
fvdl
d85f38cbec Fix braino in my interpretation of the eof flag to VOP_READDIR. 1997-10-10 22:16:04 +00:00
fvdl
d6e5e295fa Signal error when getting a 64 bit offset cookie that can't be stored
in 32 bits. Provide an error message to the user, and return EINVAL.
Also, pay attention to the EOF flag from VOP_READDIR. Correct a
misspell in a panic message.
1997-10-10 01:42:21 +00:00
mycroft
a6aa4731bc Fix errors left over from system call conversion. 1997-09-09 21:14:00 +00:00
bouyer
1cd83a5971 Fix "missing entries" bug when reading large directories: When reading a
directory and running out of space in the dest buffer, off should point to the
current entry (which was not saved) and not to the next.
I discovered this bug using linux and SunOS emulation over NFS, but seems to
affect other emulations as well.
1997-08-04 09:48:07 +00:00
christos
ee8b56d3e6 Add:
64 bit filesystem system calls
	socket system calls
	ntp system calls
1997-07-21 23:02:34 +00:00
mycroft
e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft
837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
christos
015524c601 Add nice(2). 1997-03-15 00:01:18 +00:00
christos
ac0cfc70ae implement acl, facl, memcntl 1996-12-06 03:22:34 +00:00
christos
3e00b323f3 Fix PR/2801: Zero length svr4_mmap() should return EINVAL. 1996-10-07 16:16:14 +00:00
christos
42d3980338 Fix PR/2779: statvfs returns incorrect sizes. From Aaron Brown 1996-09-25 04:37:13 +00:00
mycroft
a8fd25767d Define execv() and execve() consistently across emulations.
Do path name translation.
1996-09-03 03:12:17 +00:00
christos
8979b8342a Fix PR/2599; include <sys/dirent.h> instead of <sys/dir.h> 1996-07-05 16:31:00 +00:00
christos
13bce5bb2b - report process usage correctly. we used to get panics on SIGTSTP. 1996-06-05 19:26:13 +00:00
christos
6c2fd36998 Fixed debug printf format args. 1996-03-30 22:37:52 +00:00
christos
eb13d0121e - fixed wrong argument order in xmknod
- added proper support for {f,}pathconf
1996-02-10 17:12:31 +00:00
christos
b50214e2fa use %p in printf's instead of casts to (unsigned int) 1996-02-10 00:48:08 +00:00
christos
1b17f25866 fix prototype warnings 1996-02-09 23:12:14 +00:00
mycroft
f19761346e Do the previous change a little differently. 1996-02-02 08:09:45 +00:00
christos
9840c3ca68 Add xmknod() 1996-02-02 01:17:24 +00:00
mycroft
99686e0059 Add a vnode** argument to getvnode(), prototype it, and make it return
EBADF if the file descriptor has been revoked.
1996-01-30 20:05:33 +00:00
christos
a4e2f7532a - Added msgsys, shmsys and semsys... MITSHM needs shmsys, so X applications
that used that would fail.
- Propagated all the fixes from the fully prototyped kernel.
1995-10-14 20:24:14 +00:00
mycroft
652c9eff74 Use cookies for directory offset, mostly from Greg Hudson. 1995-10-09 11:23:57 +00:00
mycroft
245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej
eecd40e854 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:10:11 +00:00
mycroft
1e69f23205 Export bsd_to_svr4_sig[], and use it. 1995-08-14 02:07:57 +00:00
christos
ed63c665eb - make svr4_break() identical to obreak(). We still keep the code here,
to do some more testing.
- add POSIX.4 sysconfig options [we don't support them, but we don't
  return EINVAL too]
- More kludges in the interpeter load address. I hope I escape the kludge
  police...
1995-07-02 06:16:06 +00:00
christos
294f607d50 Fix alignment of svr4_getdents, so that it works for solaris2.4/sparc 1995-07-01 23:42:54 +00:00
christos
68328ddcdd Fixes for Solaris-2.4/sparc dynamically linked binaries.
We can now run them, but:

1. setcontext() causes a panic so binaries that receive signals
   crash the machine [something is wrong with the register setup].
   sleep 10 ==
    Watchdog reset
    Data Access Exception
    Type  help  for more information
    ok

2. csh says "unknown software trap a7".
3. ls gives us a bus error.
4. ldd works :-)

But I solved the problem that had been bothering me for weeks :-)
1995-06-27 22:12:47 +00:00
christos
d0169ce44a Use compat_util.[ch] 1995-06-24 20:29:17 +00:00
mycroft
abd4cc9991 Remove /dev/zero special case. It's done in mmap(). 1995-06-10 22:45:15 +00:00
christos
ee05f066e8 1. siginfo stuff torn out from wait.h to be used by the MI portion of the code.
2. many termio, ioctl, sigaction fixes
3. better socket type emulation; still ticotsord [the loopback interface I
   guess] does not work properly on svr4 4.1.
4. new gettimeofday, fixed utssys..
5. rmdir and mkdir were swapped in syscalls.master
1995-03-31 03:06:17 +00:00
christos
dbcb84b7e1 Added sigaltstack, ioctl(I_NREAD)
Replaced syssun with svr4_sysarch()
1995-02-01 01:37:33 +00:00
christos
5a54340166 Make siginfo structure a union for clarity. Fix incorrect settings of
the siginfo_t in the waitid() system call.
1995-01-25 04:17:06 +00:00