🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.linux.programowanie
Article #72669

Re: Optymalizacja zużycia zasobów systemowych

#72669
From: Sebastian Biały
Date: Sun, 03 Aug 2014 14:55
9 lines
1581 bytes
On 2014-08-01 22:17, jacki wrote:
> Zazwyczaj w /var/run/ umieszcza się plik (np. super_lcd_timer.pid) z PID
> programu. Program przy wyjściu z programu usuwa ten plik a przy
> uruchomieniu sprawdza:
> a) sprawdza tylko obecność pliku - nieelegandzkie
> b) sprawdza, czy pod PID jest ten właśnie program (sprawdzane jest w
> /proc/PID/)

Obie metody są nieeleganckie bo mają oczywisty race-condition.
Technical Details
Message-ID: <lrlihg$qhv$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <1ec42afc-f8b6-4534-ab80-20dc54e22d11@googlegroups.com> <l1n7mp$1hd$1@node1.news.atman.pl> <64040cbc-c606-4854-961a-1263cb678297@googlegroups.com> <l1na23$3vh$1@node1.news.atman.pl> <8a88459b-84f3-4fe2-ae39-e241d8ea39b2@googlegroups.com> <lrgsll$a8r$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Sebastian Biały <heby@poczta.onet.pl>
Newsgroups: pl.comp.os.linux.programowanie
Subject: Re: Optymalizacja zużycia zasobów systemowych
Date: Sun, 03 Aug 2014 16:55:38 +0200
Organization: ATMAN - ATM S.A.
Lines: 10
Message-ID: <lrlihg$qhv$1@node2.news.atman.pl>
References: <1ec42afc-f8b6-4534-ab80-20dc54e22d11@googlegroups.com> <l1n7mp$1hd$1@node1.news.atman.pl> <64040cbc-c606-4854-961a-1263cb678297@googlegroups.com> <l1na23$3vh$1@node1.news.atman.pl> <8a88459b-84f3-4fe2-ae39-e241d8ea39b2@googlegroups.com> <lrgsll$a8r$1@node1.news.atman.pl>
NNTP-Posting-Host: rtr-6-47.interkar.pl
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1407077744 27199 91.231.25.47 (3 Aug 2014 14:55:44 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Sun, 3 Aug 2014 14:55:44 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To: <lrgsll$a8r$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit