minix/lib/posix
David van Moolenbroek b423d7b477 Merge of David's ptrace branch. Summary:
o Support for ptrace T_ATTACH/T_DETACH and T_SYSCALL
o PM signal handling logic should now work properly, even with debuggers
  being present
o Asynchronous PM/VFS protocol, full IPC support for senda(), and
  AMF_NOREPLY senda() flag

DETAILS

Process stop and delay call handling of PM:
o Added sys_runctl() kernel call with sys_stop() and sys_resume()
  aliases, for PM to stop and resume a process
o Added exception for sending/syscall-traced processes to sys_runctl(),
  and matching SIGKREADY pseudo-signal to PM
o Fixed PM signal logic to deal with requests from a process after
  stopping it (so-called "delay calls"), using the SIGKREADY facility
o Fixed various PM panics due to race conditions with delay calls versus
  VFS calls
o Removed special PRIO_STOP priority value
o Added SYS_LOCK RTS kernel flag, to stop an individual process from
  running while modifying its process structure

Signal and debugger handling in PM:
o Fixed debugger signals being dropped if a second signal arrives when
  the debugger has not retrieved the first one
o Fixed debugger signals being sent to the debugger more than once
o Fixed debugger signals unpausing process in VFS; removed PM_UNPAUSE_TR
  protocol message
o Detached debugger signals from general signal logic and from being
  blocked on VFS calls, meaning that even VFS can now be traced
o Fixed debugger being unable to receive more than one pending signal in
  one process stop
o Fixed signal delivery being delayed needlessly when multiple signals
  are pending
o Fixed wait test for tracer, which was returning for children that were
  not waited for
o Removed second parallel pending call from PM to VFS for any process
o Fixed process becoming runnable between exec() and debugger trap
o Added support for notifying the debugger before the parent when a
  debugged child exits
o Fixed debugger death causing child to remain stopped forever
o Fixed consistently incorrect use of _NSIG

Extensions to ptrace():
o Added T_ATTACH and T_DETACH ptrace request, to attach and detach a
  debugger to and from a process
o Added T_SYSCALL ptrace request, to trace system calls
o Added T_SETOPT ptrace request, to set trace options
o Added TO_TRACEFORK trace option, to attach automatically to children
  of a traced process
o Added TO_ALTEXEC trace option, to send SIGSTOP instead of SIGTRAP upon
  a successful exec() of the tracee
o Extended T_GETUSER ptrace support to allow retrieving a process's priv
  structure
o Removed T_STOP ptrace request again, as it does not help implementing
  debuggers properly
o Added MINIX3-specific ptrace test (test42)
o Added proper manual page for ptrace(2)

Asynchronous PM/VFS interface:
o Fixed asynchronous messages not being checked when receive() is called
  with an endpoint other than ANY
o Added AMF_NOREPLY senda() flag, preventing such messages from
  satisfying the receive part of a sendrec()
o Added asynsend3() that takes optional flags; asynsend() is now a
  #define passing in 0 as third parameter
o Made PM/VFS protocol asynchronous; reintroduced tell_fs()
o Made PM_BASE request/reply number range unique
o Hacked in a horrible temporary workaround into RS to deal with newly
  revealed RS-PM-VFS race condition triangle until VFS is asynchronous

System signal handling:
o Fixed shutdown logic of device drivers; removed old SIGKSTOP signal
o Removed is-superuser check from PM's do_procstat() (aka getsigset())
o Added sigset macros to allow system processes to deal with the full
  signal set, rather than just the POSIX subset

Miscellaneous PM fixes:
o Split do_getset into do_get and do_set, merging common code and making
  structure clearer
o Fixed setpriority() being able to put to sleep processes using an
  invalid parameter, or revive zombie processes
o Made find_proc() global; removed obsolete proc_from_pid()
o Cleanup here and there

Also included:
o Fixed false-positive boot order kernel warning
o Removed last traces of old NOTIFY_FROM code

THINGS OF POSSIBLE INTEREST

o It should now be possible to run PM at any priority, even lower than
  user processes
o No assumptions are made about communication speed between PM and VFS,
  although communication must be FIFO
o A debugger will now receive incoming debuggee signals at kill time
  only; the process may not yet be fully stopped
o A first step has been made towards making the SYSTEM task preemptible
2009-09-30 09:57:22 +00:00
..
__exit.c Changes to make gcc compile our libraries too (Joren) 2005-10-21 11:19:35 +00:00
_access.c Initial revision 2005-04-21 14:53:53 +00:00
_alarm.c Initial revision 2005-04-21 14:53:53 +00:00
_cfgetispeed.c Initial revision 2005-04-21 14:53:53 +00:00
_cfgetospeed.c Initial revision 2005-04-21 14:53:53 +00:00
_cfsetispeed.c Initial revision 2005-04-21 14:53:53 +00:00
_cfsetospeed.c Initial revision 2005-04-21 14:53:53 +00:00
_chdir.c Re-enable fchdir() 2006-01-20 12:44:16 +00:00
_chmod.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_chown.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_chroot.c Initial revision 2005-04-21 14:53:53 +00:00
_close.c Initial revision 2005-04-21 14:53:53 +00:00
_closedir.c Initial revision 2005-04-21 14:53:53 +00:00
_creat.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_dup.c Initial revision 2005-04-21 14:53:53 +00:00
_dup2.c Initial revision 2005-04-21 14:53:53 +00:00
_execl.c Initial revision 2005-04-21 14:53:53 +00:00
_execle.c Initial revision 2005-04-21 14:53:53 +00:00
_execlp.c Initial revision 2005-04-21 14:53:53 +00:00
_execv.c Initial revision 2005-04-21 14:53:53 +00:00
_execve.c Initial revision 2005-04-21 14:53:53 +00:00
_execvp.c Initial revision 2005-04-21 14:53:53 +00:00
_fchmod.c Added fchmod() and fchown() 2006-04-18 11:26:04 +00:00
_fchown.c Added fchmod() and fchown() 2006-04-18 11:26:04 +00:00
_fcntl.c Implementation of truncate(), ftruncate() and the F_FREESP fcntl(). 2006-01-11 17:14:51 +00:00
_fork.c Initial revision 2005-04-21 14:53:53 +00:00
_fpathconf.c Initial revision 2005-04-21 14:53:53 +00:00
_fstat.c Initial revision 2005-04-21 14:53:53 +00:00
_fstatfs.c Initial revision 2005-04-21 14:53:53 +00:00
_fsync.c Add fsync() interface. 2005-09-05 21:22:45 +00:00
_getcwd.c Initial revision 2005-04-21 14:53:53 +00:00
_getegid.c Initial revision 2005-04-21 14:53:53 +00:00
_geteuid.c Initial revision 2005-04-21 14:53:53 +00:00
_getgid.c Initial revision 2005-04-21 14:53:53 +00:00
_getgroups.c Initial revision 2005-04-21 14:53:53 +00:00
_getitimer.c Support for setitimer(ITIMER_REAL). 2009-08-15 16:09:32 +00:00
_getpgrp.c Initial revision 2005-04-21 14:53:53 +00:00
_getpid.c various syscall entry points 2009-09-21 14:46:10 +00:00
_getppid.c rename GETPID to MINIX_GETPID (for now); macro for field name 2009-09-21 14:45:46 +00:00
_getuid.c Initial revision 2005-04-21 14:53:53 +00:00
_ioctl.c Initial revision 2005-04-21 14:53:53 +00:00
_isatty.c Initial revision 2005-04-21 14:53:53 +00:00
_kill.c Initial revision 2005-04-21 14:53:53 +00:00
_killpg.c Important BSD version of setenv, added killpg, replaced _sigsetjmp.c with 2006-06-07 14:38:39 +00:00
_link.c Initial revision 2005-04-21 14:53:53 +00:00
_lseek.c Initial revision 2005-04-21 14:53:53 +00:00
_lstat.c Split of architecture-dependent and -independent functions for i386, 2006-12-22 15:22:27 +00:00
_mkdir.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_mkfifo.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_mknod.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_mmap.c more vm stubs 2009-09-21 14:45:09 +00:00
_nanosleep.c Nanosleep was implemented twice, removed from _sleep.c 2009-08-16 12:55:59 +00:00
_open.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_opendir.c Getdents implementation in library/vfs/mfs. 2006-11-09 16:22:54 +00:00
_pathconf.c Initial revision 2005-04-21 14:53:53 +00:00
_pause.c Initial revision 2005-04-21 14:53:53 +00:00
_pipe.c Initial revision 2005-04-21 14:53:53 +00:00
_ptrace.c rename GETPID to MINIX_GETPID (for now); macro for field name 2009-09-21 14:45:46 +00:00
_read.c Initial revision 2005-04-21 14:53:53 +00:00
_readdir.c Getdents implementation in library/vfs/mfs. 2006-11-09 16:22:54 +00:00
_readlink.c library fixes for symlink, readlink and lstat 2005-11-01 13:13:31 +00:00
_rename.c Initial revision 2005-04-21 14:53:53 +00:00
_rewinddir.c Initial revision 2005-04-21 14:53:53 +00:00
_rmdir.c Initial revision 2005-04-21 14:53:53 +00:00
_select.c Added _select() stub for select(). 2006-06-27 18:28:33 +00:00
_setgid.c seteuid() and setegid() 2005-12-13 09:48:29 +00:00
_setitimer.c Support for setitimer(ITIMER_REAL). 2009-08-15 16:09:32 +00:00
_setsid.c Initial revision 2005-04-21 14:53:53 +00:00
_setuid.c seteuid() and setegid() 2005-12-13 09:48:29 +00:00
_sigaction.c Initial revision 2005-04-21 14:53:53 +00:00
_sigpending.c Initial revision 2005-04-21 14:53:53 +00:00
_sigprocmask.c Initial revision 2005-04-21 14:53:53 +00:00
_sigreturn.c Setjmp/longjmp updates and cleanup. 2006-12-08 16:23:18 +00:00
_sigset.c Merge of David's ptrace branch. Summary: 2009-09-30 09:57:22 +00:00
_sigsuspend.c Initial revision 2005-04-21 14:53:53 +00:00
_sleep.c Nanosleep was implemented twice, removed from _sleep.c 2009-08-16 12:55:59 +00:00
_stat.c Initial revision 2005-04-21 14:53:53 +00:00
_stime.c Moved stime, time, times POSIX calls from FS to PM. Removed child time 2005-05-31 09:50:51 +00:00
_symlink.c library fixes for symlink, readlink and lstat 2005-11-01 13:13:31 +00:00
_sync.c Initial revision 2005-04-21 14:53:53 +00:00
_tcdrain.c Initial revision 2005-04-21 14:53:53 +00:00
_tcflow.c Initial revision 2005-04-21 14:53:53 +00:00
_tcflush.c Initial revision 2005-04-21 14:53:53 +00:00
_tcgetattr.c Initial revision 2005-04-21 14:53:53 +00:00
_tcsendbreak.c Initial revision 2005-04-21 14:53:53 +00:00
_tcsetattr.c Initial revision 2005-04-21 14:53:53 +00:00
_time.c Moved stime, time, times POSIX calls from FS to PM. Removed child time 2005-05-31 09:50:51 +00:00
_times.c Moved stime, time, times POSIX calls from FS to PM. Removed child time 2005-05-31 09:50:51 +00:00
_truncate.c Implementation of truncate(), ftruncate() and the F_FREESP fcntl(). 2006-01-11 17:14:51 +00:00
_umask.c Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. 2005-06-23 11:07:31 +00:00
_uname.c Disabled building rescue driver (no longer needed). Moved allocmem from 2006-05-19 12:19:37 +00:00
_unlink.c Initial revision 2005-04-21 14:53:53 +00:00
_utime.c Initial revision 2005-04-21 14:53:53 +00:00
_wait.c Initial revision 2005-04-21 14:53:53 +00:00
_waitpid.c Initial revision 2005-04-21 14:53:53 +00:00
_write.c Initial revision 2005-04-21 14:53:53 +00:00
getloadavg.c dynamic HZ 2008-12-11 14:37:18 +00:00
getopt.c Fix compiler warnings for pax 2006-03-24 14:03:25 +00:00
gettimeofday.c complete, tick-resolution gettimeofday() implementation 2005-07-06 07:08:36 +00:00
glob.c A glob() implementation. 2008-04-08 13:14:33 +00:00
Makefile.in nanosleep(3), and sleep(3) rewrite, by Erik van der Kouwe 2009-08-15 22:14:48 +00:00
nice.c Nice(3) implementation 2006-10-20 14:10:53 +00:00
priority.c get/setpriority() and fsync() system calls 2005-07-01 18:01:33 +00:00
usleep.c Usleep implementation based on select. 2005-07-11 13:08:00 +00:00