From owner-freebsd-questions@FreeBSD.ORG Thu Nov 27 08:41:26 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A5BF1A for ; Thu, 27 Nov 2014 08:41:26 +0000 (UTC) Received: from sender1.zohomail.com (sender1.zohomail.com [74.201.84.155]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 982C2F1E for ; Thu, 27 Nov 2014 08:41:26 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=bsdjunk; d=bsdjunk.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=C9nrwaiggtbJOyR51/oRClKPmU7qdezMpCQmHodKz6KWEoTzhSKTPvKuNsA8kFPvzzvJT5+BRYQ6 eVrSavp4hY9/jIIjl11DPIzhP2BYCnVp/rje6inYLgZ1uB5Jjk1jaAhkhmx2zGaf1lsjZpjzt/Od ffHiHJJkz83rWi17jHQ= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1417077683799912.8477625505765; Thu, 27 Nov 2014 00:41:23 -0800 (PST) Date: Thu, 27 Nov 2014 02:41:23 -0600 From: chris To: Moreno Carullo 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> Subject: Re: Testing if a process is protected MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 08:41:26 -0000 ps -O flags flags The flags associated with the process as in the include file : 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 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" >