Testing if a process is protected

Moreno Carullo moreno.carullo at nozominetworks.com
Thu Nov 27 08:45:59 UTC 2014


Works great, thanks!
Moreno


On 27 Nov 2014, at 09:41, chris <chris at bsdjunk.com<mailto:chris at bsdjunk.com>> wrote:


ps -O flags
flags     The flags associated with the process as in the include file
              <sys/proc.h>:
P_PROTECTED          0x100000      Do not kill on memory
                                                 overcommit

[chris at pcbsd-chris] ~% ps -O flags,class
 PID        F CLASS  TT  STAT    TIME COMMAND
3476 10104002 daemon  0  Ss   0:00.25 csh
11072 10004002 daemon  0  R+   0:00.00 ps -O flags,class
[chris at pcbsd-chris] ~%

csh is protected ps is not ? hope this helps some :P

-------------------------------------
Chris Petrik
FreeBSD Developer
E on FreeBSD
------
As in certain cults it is possible to kill a process if you know its true name.
-- Ken Thompson and Dennis M. Ritchie







---- On Thu, 27 Nov 2014 02:12:47 -0600 Moreno Carullo<moreno.carullo at nozominetworks.com<mailto:moreno.carullo at nozominetworks.com>> wrote ----
Hi all,

I am implementing a set of automated tests for my FreeBSD system, and I would like to verify that a specific process has been protect(ed) (https://www.freebsd.org/cgi/man.cgi?query=protect&sektion=1).

How can I verify that a given PID has been protected ?

Thanks,
 Moreno



_______________________________________________
freebsd-questions at freebsd.org<mailto:freebsd-questions at freebsd.org> mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org<mailto:freebsd-questions-unsubscribe at freebsd.org>"



_______________________________________________
freebsd-questions at freebsd.org<mailto:freebsd-questions at freebsd.org> mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list