Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Nov 2014 08:45:32 +0000
From:      Moreno Carullo <moreno.carullo@nozominetworks.com>
To:        chris <chris@bsdjunk.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Testing if a process is protected
Message-ID:  <30A09422-43A1-41AC-B4D5-D1C3F8B8B529@nozominetworks.com>
In-Reply-To: <149f0697626.12068b091475894.2764701695520266620@bsdjunk.com>
References:  <02A42D40-6B9F-4322-9BA0-4D96A8B5C422@nozominetworks.com> <149f0697626.12068b091475894.2764701695520266620@bsdjunk.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Works great, thanks!
Moreno


On 27 Nov 2014, at 09:41, chris <chris@bsdjunk.com<mailto:chris@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@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 n=
ame.
-- Ken Thompson and Dennis M. Ritchie







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

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

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

Thanks,
 Moreno



_______________________________________________
freebsd-questions@freebsd.org<mailto: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=
<mailto:freebsd-questions-unsubscribe@freebsd.org>"



_______________________________________________
freebsd-questions@freebsd.org<mailto: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?30A09422-43A1-41AC-B4D5-D1C3F8B8B529>