From owner-freebsd-questions@FreeBSD.ORG Thu Nov 27 08:45:59 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 93DC117F for ; Thu, 27 Nov 2014 08:45:59 +0000 (UTC) Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0765.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe00::765]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE4DCF47 for ; Thu, 27 Nov 2014 08:45:58 +0000 (UTC) Received: from AM2PR04MB0545.eurprd04.prod.outlook.com (25.160.31.12) by AM2PR04MB0738.eurprd04.prod.outlook.com (25.160.55.24) with Microsoft SMTP Server (TLS) id 15.1.26.15; Thu, 27 Nov 2014 08:45:35 +0000 Received: from AM2PR04MB0547.eurprd04.prod.outlook.com (25.160.31.139) by AM2PR04MB0545.eurprd04.prod.outlook.com (25.160.31.12) with Microsoft SMTP Server (TLS) id 15.1.26.15; Thu, 27 Nov 2014 08:45:32 +0000 Received: from AM2PR04MB0547.eurprd04.prod.outlook.com ([25.160.31.139]) by AM2PR04MB0547.eurprd04.prod.outlook.com ([25.160.31.139]) with mapi id 15.01.0026.003; Thu, 27 Nov 2014 08:45:32 +0000 From: Moreno Carullo To: chris Subject: Re: Testing if a process is protected Thread-Topic: Testing if a process is protected Thread-Index: AQHQChntYr1muMnZ80utAYbjp4VfkJx0J6SAgAABIYA= Date: Thu, 27 Nov 2014 08:45:32 +0000 Message-ID: <30A09422-43A1-41AC-B4D5-D1C3F8B8B529@nozominetworks.com> References: <02A42D40-6B9F-4322-9BA0-4D96A8B5C422@nozominetworks.com> <149f0697626.12068b091475894.2764701695520266620@bsdjunk.com> In-Reply-To: <149f0697626.12068b091475894.2764701695520266620@bsdjunk.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [151.66.168.230] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0545;UriScan:; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0545; x-forefront-prvs: 040866B734 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(164054003)(199003)(189002)(41574002)(53754006)(24454002)(95666004)(106356001)(122556002)(2656002)(46102003)(107046002)(83716003)(87936001)(77156002)(31966008)(77096003)(62966003)(15202345003)(106116001)(40100003)(105586002)(82746002)(101416001)(20776003)(120916001)(86362001)(4396001)(66066001)(21056001)(92726001)(36756003)(16236675004)(64706001)(33656002)(92566001)(19617315012)(54356999)(99396003)(76176999)(19580405001)(50986999)(15975445006)(19580395003)(97736003)(110136001)(104396001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR04MB0545; H:AM2PR04MB0547.eurprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0738; X-OriginatorOrg: nozominetworks.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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:45:59 -0000 Works great, thanks! Moreno On 27 Nov 2014, at 09:41, chris > wrote: 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 n= ame. -- 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 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 mailing= list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org= " _______________________________________________ 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= "