From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 30 07:33:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30BF106564A for ; Wed, 30 Jun 2010 07:33:17 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5B6A38FC08 for ; Wed, 30 Jun 2010 07:33:16 +0000 (UTC) Received: by wyb34 with SMTP id 34so603712wyb.13 for ; Wed, 30 Jun 2010 00:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=PY76K+WpMcy8MmRI7yvZe98S34BL9lkbk4zZuP4wxyU=; b=lUG0Id9jdd1oy6/jOz39D7WYK6vmByqSqJpzHkA2AoMulyLmAspJ1GMnZ6b0I+uxTJ WThfHhG4YfQhDaH+ZcXjWsaKXJ/RFU5CgAkmJo94mdynIGHtaNQRmGRXd0WV4zlD5pjQ 5ZKJV/Z0BW9FtMS1xG8ks547ieTK1Z//27IKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=I8T7Fd/VfH9DkEDL94Z/SdzEv91xAMuGLDVLLKvqwKm9Q2W7l/JeQP+wzChmgTrlw5 nY2JhtfWeHrc8WOTT34nuDQ+qeBdIPDA6ziNcdS+qFPaaqSycXtuAVmL+6mHXIWQSANi pv5ulOADIVPXtNxsmc7a3iwTiPjEFa178RGGM= MIME-Version: 1.0 Received: by 10.216.85.211 with SMTP id u61mr10840747wee.103.1277883190210; Wed, 30 Jun 2010 00:33:10 -0700 (PDT) Received: by 10.216.37.68 with HTTP; Wed, 30 Jun 2010 00:33:10 -0700 (PDT) In-Reply-To: <4C2AE37C.5060000@gmail.com> References: <4C2AE37C.5060000@gmail.com> Date: Wed, 30 Jun 2010 11:33:10 +0400 Message-ID: From: pluknet To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: How change process flags from userland? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 07:33:17 -0000 On 30 June 2010 10:26, Andrey Zonov wrote: > Hi, > > I want to set P_PROTECTED flag for some daemons after it start, without > patching application and kernel. > It possible? > May be madvise(NULL, 0, MADV_PROTECT) will fit your needs? (see howto example in usr.sbin/cron). Note, this behav isn't portable. -- wbr, pluknet