linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Armin Burchardt <armin@uni-bremen.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH 2/3] slcand: add option -p<file> to write pid to a file.
Date: Mon, 8 Jun 2015 15:55:26 +0200	[thread overview]
Message-ID: <55759ECE.6000302@pengutronix.de> (raw)
In-Reply-To: <20150608134327.Horde.pLkodAvAfc3OuL7mi_j9ulf@webmail.uni-bremen.de>

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On 06/08/2015 03:43 PM, Armin Burchardt wrote:
> Hi Marc,
> 
>> I think "/run/slcand/<IFACE>" would fit better into modern file system
>> layout. What about having a default for the pid file path?
> 
> I would not expect a daemon to accept a filename (or only parts of it) without

Me neither. I was thinking that "-p" without a path would generate a
pidfile in "/run/slcand/<IFACE>"

> a full path. The /etc/init.d/skeleton of Debian wheezy uses /var/run/$NAME.pid

wheezy (a.k.a. old-old-stable)? Ist that still alive? :D

> (for start-stop-daemon's --pidfile option).
> Do we know enough about the filesystem layout of existing (embedded)  
> systems to define
> a useful default?

systemd uses "/run/<daemon>.pid" or "/run/<daemon>/<foo>.pid"

>> Does it make sense to open in exclusive mode?
> 
> If another daemon is started with the same pidfile we would have to give
> up if the file already exists to take advantage of that. Is it  
> expected of a daemon
> using a pidfile to exit with an error or should it just overwrite an  
> existing file?

Right....probably not worth the trouble, keep it as is.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2015-06-08 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 11:55 [PATCH 1/3] slcand: daemonize _after_ interface is created, renamed and up Armin Burchardt
2015-06-08 11:55 ` [PATCH 2/3] slcand: add option -p<file> to write pid to a file Armin Burchardt
2015-06-08 13:00   ` Marc Kleine-Budde
2015-06-08 13:43     ` Armin Burchardt
2015-06-08 13:55       ` Marc Kleine-Budde [this message]
2015-06-08 11:55 ` [PATCH 3/3] slcand: add option -u to set interface up/down state Armin Burchardt
2015-06-08 12:51 ` [PATCH 1/3] slcand: daemonize _after_ interface is created, renamed and up Marc Kleine-Budde
2015-06-09  9:15 ` [PATCH v2 0/3] slcand: improved patches Armin Burchardt
2015-06-09  9:15   ` [PATCH v2 1/3] slcand: daemonize _after_ interface is created and renamed Armin Burchardt
2015-06-09  9:15   ` [PATCH v2 2/3] slcand: add option -p<file> to write pid to a file Armin Burchardt
2015-06-09  9:15   ` [PATCH v2 3/3] slcand: add option -u to set interface up/down state Armin Burchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55759ECE.6000302@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=armin@uni-bremen.de \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).