util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kasprzak <kas@fi.muni.cz>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: flock(1) exit code (enhancement request)
Date: Tue, 5 Jun 2012 16:26:50 +0200	[thread overview]
Message-ID: <20120605142650.GA19940@fi.muni.cz> (raw)
In-Reply-To: <20120605114616.GB14536@x2.net.home>

Karel Zak wrote:
: On Tue, May 29, 2012 at 01:45:18PM +0200, Jan Kasprzak wrote:
: >         This problem can be solved for example by mapping the exit code 1
: > of the -c command to something else. I.e. to add something like
: > 
: >         -m <number>
: >         --map-exit-code-1-to <number>
: > 
: > where the exit code of flock(1) would be <number>, iff the -c <command> exits
: > with code 1.
: 
: Not sure if a generic remap for exit(1) is a good solution.

	OK, understood.

: > 	The alternative would be to have user-settable exit code for
: > the "conflicting lock exists" failure.
: 
: Yes, It would be nice to have user-settable exit codes, for:
: 
:     --rc-timeout <num>
:     --rc-conflict <num>

	These two states (timeout and conflict) are mutually exclusive,
so I think only one option would be sufficient. Also, I don't like the
acronym (rc) in the long option.

	I propose the "--conflict-exit-code <num>" name.

: > 	What do you think about it? If you agree with the above syntax,
: > I can of course post a patch to flock(1).
: 
: Send patch.

	The patch follows in a separate message.

-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/    Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list.     --Alan Cox

  parent reply	other threads:[~2012-06-05 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 11:45 flock(1) exit code (enhancement request) Jan Kasprzak
2012-06-05 11:46 ` Karel Zak
2012-06-05 14:08   ` H. Peter Anvin
2012-06-05 14:26   ` Jan Kasprzak [this message]
2012-06-05 14:26   ` [PATCH] flock: user-configurable exit code Jan "Yenya" Kasprzak
2012-06-15  9:15     ` Karel Zak

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=20120605142650.GA19940@fi.muni.cz \
    --to=kas@fi.muni.cz \
    --cc=hpa@zytor.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@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).