Date: Thu, 27 Nov 2014 02:41:23 -0600 From: chris <chris@bsdjunk.com> To: Moreno Carullo <moreno.carullo@nozominetworks.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Testing if a process is protected Message-ID: <149f0697626.12068b091475894.2764701695520266620@bsdjunk.com> In-Reply-To: <02A42D40-6B9F-4322-9BA0-4D96A8B5C422@nozominetworks.com> References: <02A42D40-6B9F-4322-9BA0-4D96A8B5C422@nozominetworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?149f0697626.12068b091475894.2764701695520266620>
