Bug 131423

Summary: [NEW PORT] sysutils/scprotect: Protect process from killing when the swap space is exhausted
Product: Ports & Packages Reporter: Denis Barov <dindin>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar none

Description Denis Barov 2009-02-05 15:30:03 UTC
The scprotect utility is used for set or onset P_PROTECTED on running process

Actually, scprotect uses syscall, implemented in module
scprotect.ko. It's work like madvise(2) system call with MADV_PROTECT behaviour. Exeption is that madvise(2) can be used only by process itself,
not from extertnal applications.  It informs the VM system this process
should not be killed when the swap space is exhausted.  The process must
have superuser privileges.  This should be used for processes that must
remain running for the system to properly function.

Fix: Patch attached with submission follows:
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2009-02-05 21:59:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2009-02-10 23:15:08 UTC
State Changed
From-To: open->closed

New port added, with minor changes. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-02-10 23:15:14 UTC
amdmi3      2009-02-10 23:15:03 UTC

  FreeBSD ports repository

  Modified files:
    sysutils             Makefile 
  Added files:
    sysutils/scprotect   Makefile distinfo pkg-descr pkg-message 
                         pkg-plist 
  Log:
  scprotect is implementation of system call for setting or unsetting
  P_PROTECTED flag. It's similar to madvise(2) behaviour MADV_PROTECT,
  but may be used for already running processes. Also rc.d/scprotect
  scripts allow you to set protection flag even if process was
  restarted by user.
  
  WWW:    http://dindin.ru/scprotect/
  
  PR:             131423
  Submitted by:   Denis Barov <dindin at dindin dot ru>
  
  Revision  Changes    Path
  1.1077    +1 -0      ports/sysutils/Makefile
  1.1       +36 -0     ports/sysutils/scprotect/Makefile (new)
  1.1       +3 -0      ports/sysutils/scprotect/distinfo (new)
  1.1       +7 -0      ports/sysutils/scprotect/pkg-descr (new)
  1.1       +13 -0     ports/sysutils/scprotect/pkg-message (new)
  1.1       +5 -0      ports/sysutils/scprotect/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"