summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 1. when signalling a process group, don't deliver a copy to every threadtedu2005-12-221-3/+9
| | | | | | | 2. when delivering a STOP or CONT signal to a process, now replicate to every thread. makes ^Z and fg work nicer, first noticed by peter hessler. signals and threads are not right, but this is at least a little less wrong.
* kernel support for threaded processes (rthreads).tedu2005-12-031-2/+28
| | | | | | | | uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to facilitate a userland thread library. all conditional on RTHREADS, currently disabled. ok deraadt
* ansi/deregister.jsg2005-11-281-116/+53
| | | | 'go for it' deraadt@
* A second approach at fixing the telnet localhost & problemniklas2005-06-171-26/+8
| | | | | | | | | | | | | | (but I tend to call it ssh localhost & now when telnetd is history). This is more localized patch, but leaves us with a recursive lock for protecting scheduling and signal state. Better care is taken to actually be symmetric over mi_switch. Also, the dolock cruft in psignal can go with this solution. Better test runs by more people for longer time has been carried out compared to the c2k5 patch. Long term the current mess with interruptible sleep, the default action on stop signals and wakeup interactions need to be revisited. ok deraadt@, art@
* sched work by niklas and art backed out; causes panicsderaadt2005-05-291-21/+42
|
* This patch is mortly art's work and was done *a year* ago. Art wants to thankniklas2005-05-251-42/+21
| | | | | | | | | | | | | | | | everyone for the prompt review and ok of this work ;-) Yeah, that includes me too, or maybe especially me. I am sorry. Change the sched_lock to a mutex. This fixes, among other things, the infamous "telnet localhost &" problem. The real bug in that case was that the sched_lock which is by design a non-recursive lock, was recursively acquired, and not enough releases made us hold the lock in the idle loop, blocking scheduling on the other processors. Some of the other processors would hold the biglock though, which made it impossible for cpu 0 to enter the kernel... A nice deadlock. Let me just say debugging this for days just to realize that it was all fixed in an old diff noone ever ok'd was somewhat of an anti-climax. This diff also changes splsched to be correct for all our architectures.
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-5/+4
| | | | no change in compiler assembly output.
* proc_stop needs sched_lock locked. From art, verified with NetBSD.niklas2004-07-041-2/+2
|
* debranch SMP, have funniklas2004-06-131-8/+42
|
* fix siginfo generation for posted signals and avoid double ktrpsig() call for the same signal; deraadt@ okmickey2004-04-061-17/+28
|
* change sigaltstack.ss_size type to size_t. handle syscall fallout.tedu2004-01-141-3/+48
| | | | | add stack_t and ucontext_t typedefs. ok deraadt@
* match syscallargs comments with realityhenning2003-09-011-3/+3
| | | | | from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-2/+2
| | | | | | | | | argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
* Use strlcpy(), not strncpy() when copying p->p_comm to core.c_namemillert2003-08-041-2/+2
| | | | to guarantee NUL termination; from Patrick Latifi.
* Implement the WCONTINUED flag to the wait(2) family of syscalls and themillert2003-08-031-2/+6
| | | | | | | | | associated WIFCONTINUED macro as per 1003.1-2001. Adapted from FreeBSD. A minor amount of trickiness is involved here. The value for WCONTINUED is chosen in such a way that _WSTATUS(_WCONTINUED) == _WSTOPPED and the WIFSTOPPED macro has been modified such that WIFSTOPPED(_WCONTINUED) != _WSTOPPED. This means we don't need to add an extra check to the WIFSIGNALED and WIFSTOPPED macros. deraadt@ OK.
* remove caddr_t casts. it's just silly to cast something when the functiontedu2003-07-211-11/+9
| | | | takes a void *. convert uiomove to take a void * as well. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* string fixes; tedu okderaadt2003-05-031-2/+2
|
* Oppsie. Missing part from this commit:art2002-10-011-3/+3
| | | | | | | | Prevent two localhost crashes with proc filters. - don't send NOTE_SIGNAL to exiting processes. - null dereference on error condition. from Peter Werner <peterw at ifost.org.au> deraadt@ ok
* be more permissive, and let close relatives do SIGALRMderaadt2002-07-141-1/+2
|
* Protect mi_switch with splstatclock.art2002-06-111-4/+8
|
* A process can always signal itself--no need to restrict signals even ifmillert2002-05-081-1/+4
| | | | it is setugid. deraadt@ ok
* Provide the correct signal number to the ktrace PSIG information insteadmiod2002-04-181-5/+9
| | | | | of an uninitialized variable. millert@ ok
* First round of __P removal in sysmillert2002-03-141-4/+4
|
* include a siginfo_t with ktrace PSIG information, so that kdump can printderaadt2002-02-221-8/+17
| | | | | | | fault addresses and other information. (a small bug exists: in some signal delivery cases, two PSIG records may be inserted, because postsig() is unaware a PSIG record has already been placed. but this small bug can stay since the siginfo_t information helps us find and fix other bugs)
* Ignore signals if/when we are exiting.weingart2002-01-311-1/+8
| | | | | | Prevents a hang in the NFS code when dumping core and pressing ^C, etc. ok art@
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-2/+2
| | | | | | | | | | | | | | | | | | well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
* If handler for SIGCHLD is SIG_IGN, reset to SIG_DLF. This is consistentmillert2002-01-191-1/+3
| | | | | with our handling of SA_NOCLDWAIT as well as other operating systems. From FreeBSD.
* If the handler for SIGCHLD is set to SIG_IGN, act as if themillert2002-01-071-13/+12
| | | | | | SA_NOCLDWAIT (don't create zombies) flag has been specified. This is consistent with most other operating systems and is what XPG4.2 specifies.
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-4/+2
| | | | (Look ma, I might have broken the tree)
* execsigs() could modify the wrong sigacts; based on David.Arana@eng.sun.com saying he could not understand how this workedderaadt2001-09-211-2/+3
|
* cosmetic.art2001-09-201-2/+2
|
* Unshare signal actions on exec, from NetBSD. While I am here a little KNF nit tooniklas2001-08-091-2/+4
|
* remove old vmart2001-06-271-5/+1
|
* KNFderaadt2001-06-221-12/+12
|
* trace_req is a nop.art2001-06-181-10/+8
| | | | rename stop -> proc_stop (stop is not a good function name).
* kill COMPAT_{09,10,11} kernel options. We still need kern_info_09.c and kern_ipc_10.c for other compat modules.millert2001-05-161-5/+1
|
* On popular demand, the Linux-compatibility clone(2) implementation basedniklas2001-04-021-3/+78
| | | | | on NetBSD's code, as well as some faked Posix RT extensions by me. This makes at least simple linuxthreads tests work.
* Clean up spl handling.art2001-02-191-12/+15
|
* support kernel event queues, from FreeBSD by Jonathan Lemon,provos2000-11-161-1/+54
| | | | okay art@, millert@
* Change the ktrace interface functions from taking the trace vnode to taking theart2000-11-101-4/+3
| | | | traced proc. The vnode is in the proc and all functions need the proc.
* Changes to exit handling.art2000-06-051-2/+2
| | | | | | | | cpu_exit no longer frees the vmspace and u-area. This is now handled by a separate kernel thread "reaper". This is to avoid sleeping locks in the critical path of cpu_exit where we're not allowed to sleep. From NetBSD
* Change kernel-only open flag FNOSYMLINK to userland-visible O_NOFOLLOW;millert2000-04-211-2/+2
| | | | | | adapated from FreeBSD. Also change O_FSYNC to the more standard O_SYNC and document it. open(2) needs some real examples for proper usage, to come later.
* Use LIST_ macros instead of internal field names to walk the allproc list.art2000-03-031-2/+2
|
* more stack direction fixes; art@ okmickey1999-11-051-1/+5
|
* on exec, clear P_NOCLDWAIT; ambrisko@whistle.comderaadt1999-07-181-1/+2
|
* uvm allocation and name changesart1999-02-261-1/+9
|
* oopsderaadt1999-02-181-2/+1
|
* missing spl; christosderaadt1999-02-171-1/+2
|
* permit SIGUSR1/USR2 through as well in cansignal()deraadt1998-06-071-1/+3
|