From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#35550: Installer: wpa_supplicant fails to start Date: Sun, 05 May 2019 22:26:01 +0200 Message-ID: <87zho0y7fq.fsf@gnu.org> References: <87sgtv8hcz.fsf@gnu.org> <875zqr8dnw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNNiy-0002g5-27 for bug-guix@gnu.org; Sun, 05 May 2019 16:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNNix-0007Ul-5r for bug-guix@gnu.org; Sun, 05 May 2019 16:27:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41459) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNNix-0007UU-1n for bug-guix@gnu.org; Sun, 05 May 2019 16:27:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNNiv-0004WB-Kd for bug-guix@gnu.org; Sun, 05 May 2019 16:27:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <875zqr8dnw.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 03 May 2019 22:51:31 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 35550@debbugs.gnu.org Cc: sirgazil Ludovic Court=C3=A8s skribis: > You would expect wpa_supplicant to create its PID file atomically: write > it under a different name, then rename(2)=E2=80=A6 but no: Regarding this PID file atomicity issue, a few other data points: Tor, syslogd (GNU Inetutils), sshd (OpenSSH), and dbus-daemon all do the exact same non-atomic PID file creation as wpa_supplicant. Libdaemon (used by Avahi) does something more fancy: it acquires an exclusive write lock (fcntl with F_SETLKW) on the PID file right after opening it, but since shepherd does not attempt to acquire locks on PID file, it has no effect. systemd and GNU=C2=A0Pies don=E2=80=99t take any precautions while reading = PID files. The assumption seems to be that if the file exists, then it must contain a valid PID. So perhaps the problem we see with =E2=80=98wpa_supplicant=E2=80=99 is else= where. Ludo=E2=80=99.