Commit Graph

306 Commits

Author SHA1 Message Date
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
bouyer 52497e180a Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.
1999-09-28 14:47:00 +00:00
christos d205cc9cd4 oops, forgot to include new files. 1999-09-07 18:20:18 +00:00
christos ffdf7a5fe8 regen 1999-09-07 06:25:14 +00:00
christos c7897366b5 preliminary lwp support; currently staroffice breaks because set_ldt emulation
is borken, not because of threads problems.
1999-09-07 06:24:56 +00:00
thorpej 2c358fca82 Update for new msgctl()/semctl()/shmctl() calls. 1999-08-25 04:52:06 +00:00
kleink a6a1795f0e Nuke a comment of mine (obsoleted by previous revision). 1999-08-22 13:11:38 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
christos 2f73c9bc1d sparc is not defined anymore... Use __sparc__ and __i386__. Also default
to the standard elf NOADDR...
1999-08-01 23:55:40 +00:00
rh cfa2c0bd79 Remove superfluous NULL argument from proclist_lock_read() call. 1999-07-25 08:55:46 +00:00
thorpej 01a8cffe77 Add a read/write lock to the proclists and PID hash table. Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.
1999-07-22 21:08:30 +00:00
thorpej 32e1fd0d03 Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit().  cpu_wait() must
be done before uvm_exit() because the resources it frees might be located
in the PCB.
1999-07-20 21:54:05 +00:00
pk bd84136493 copyinst() takes a `size_t *'. 1999-05-27 14:03:05 +00:00
kleink fe0ce0cd42 Need to explicitly include <machine/cpu.h> for a cpu_wait() macro definition. 1999-05-08 01:23:01 +00:00
thorpej e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
cgd af8a9059d3 compute the value to be used for e_arglen via howmany(value, sizeof (char *)),
rather than just "value / sizeof (char *)".  While in these cases the latter
works as well, the former's a better example for other uses to copy (since
it handles the non-integral multiple case correctly).
1999-04-30 23:07:01 +00:00
kleink ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
tv 724f072dde Nuke my copyrights and/or assign them to TNF where appropriate. 1999-04-06 02:55:24 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
kleink 6558e04aea Translate _PC_FILESIZEBITS. 1999-03-23 14:57:00 +00:00
sommerfe 166f97ecf3 Use regular system fchroot, now that we have it. 1999-03-22 17:30:37 +00:00
sommerfe 5effda814f Use standard system fchroot instead of emulation-specific copy. 1999-03-22 17:28:21 +00:00
christos 03ff6653d6 Regen 1999-02-09 20:48:20 +00:00
christos 8087b4fda3 const poisoning and CHECK_ALT_CREAT fixes. 1999-02-09 20:46:41 +00:00
christos dcee031682 const poisoning and CHECK_ALT_CREAT fixes. 1999-02-09 20:46:40 +00:00
kleink 764fdafc63 Only declare the uc_pad member if SVR4_UC_MACHINE_PAD is defined. 1999-01-26 18:41:03 +00:00
christos b02601323e Fix idiotic errors in I_SETSIG:
1. the mask is passed by value, not by reference
2. compare the rest of the mask bits not the valid ones
3. return 0, not the current fd's flags.

Now appletviewer works on an inet display. It will not work
with :0 because /tmp/.X11-pipe/X0 is a named pipe, not a
socket like our /tmp/.X11-unix/X0. Maybe I'll kludge svr4_sys_open
to return an fd to a unix socket when someone attempts to call
open on a unix socket.
1999-01-23 23:44:08 +00:00
christos 7983ffaeef Don't play silly games with O_NON_BLOCK vs O_NDELAY.
Add O_RSYNC and O_DSYNC
1999-01-23 23:38:02 +00:00
christos 1bdb52515d - Make the pad field machine dependent (argh!)
- Add protototypes for the mi and md get/setcontext functions.
1999-01-21 23:22:35 +00:00
christos b52c37957d Handle the mi portion of the *context system call here. Changes from previous
version:
1. The stack_t returned before was SS_DISABLED; now we enable the stack
   and return a 16K stack which is 16K under the current stack pointer.
   This seems to be what solaris does.
2. Preserve uc_link.
1999-01-21 23:20:43 +00:00
christos 1ac6ce917e Add prototype for svr4_sendsig. 1999-01-21 23:17:19 +00:00
christos e6f6898376 Include the right headers to find svr4_sendsig. 1999-01-21 23:16:43 +00:00
kleink 5eb233ddd5 Return the machine's ISA for SI_ARCHITECTURE. 1999-01-20 22:09:17 +00:00
kleink 4ff7b1f346 Add symbolic names for the sys_context() subcodes. 1999-01-12 02:09:18 +00:00
kleink bb6c814341 If a null pointer argument is passed to setcontext(), exit the process; it
would appear that overloading the argument this way is used by SVR4 to `fall
off' the main context (uc_link being NULL) after a function set up using
makecontext() returns.
1999-01-12 00:16:40 +00:00
drochner ba4af3c3de regen 1998-12-18 18:59:06 +00:00
drochner b71f154130 remove compat_xxx dependencies where they don't belong 1998-12-18 18:49:59 +00:00
drochner 52c16cf83a get "opt_compat_svr4.h" out of <sys/conf.h> 1998-12-18 16:55:39 +00:00
christos 1dd3565a09 Fix a long standing bug in wait(2) where the signal was left untranslated,
and defensively code the signal translation.
1998-12-16 10:36:50 +00:00
christos 49be13158d Make gerlimit(RLIM_NOFILE, rlp), return rlp->rlim_max == maxfiles, not
RLIM_INFINITY like we do. Java uses rlim_max to allocate a data structure
per file descriptor.
what we do is bogus anyway, because:

    setrlimit(RLIM_NOFILE, {RLIM_INFINITY, RLIM_INFINITY}}

sets the limit to { maxfiles, maxfiles }

I undestand that this is so that if we change maxfiles via sysctl, processes
can still use the new maximum, but it is probably more appropriate to return
the current value of maxfiles (and maxproc) at every getrlimit call, even
if the current value for either is RLIM_INFINITY.

Anyway, java now works on the the sparc, on the i386 loses on setcontext().
1998-12-13 18:00:52 +00:00
christos f0c7751046 Regen 1998-12-10 17:13:06 +00:00
christos 879032f748 fix systeminfo. We return ipc86 for the i386, SUNW,SPARCstation-10 for
sparc, and unknown for the rest. Also make sure that the string is terminated
properly and the length is returned as the specification calls. Maybe sometime
we can read the prom on the sparc and return the actual model.
1998-12-10 17:06:13 +00:00
christos b0b86b5b7f Defopt COMPAT_43 1998-12-10 17:03:19 +00:00
christos 02e50c5ac1 Clarify some signed/unsigned confusion with resource limit setting.
Still don't understand you some old binaries try to use 5 for vmem
instead of 6.
1998-11-30 15:46:33 +00:00
christos dd597a541c regen 1998-11-28 21:53:33 +00:00
christos 298d9e0d50 Deal with {get,set}rlimit{,64} properly, respecting the RLIM_INFINITY,
RLIM_SAVED_MAX, and RLIM_SAVED_CUR values. We should fix our own implementation
to do this and use unsigned numbers for rlim_t as solaris does.
1998-11-28 21:53:02 +00:00
christos d7846c84e1 Conflict resolution. 1998-11-27 18:33:21 +00:00
christos f8c52e6cf3 use a symbolic constant instead of just 0 1998-11-27 18:32:09 +00:00
christos 786b3a2c22 regen 1998-11-27 15:22:44 +00:00
christos 87308428af take a stab at implementing resolvepath(2) 1998-11-27 15:08:50 +00:00