From: Karel Zak <kzak@redhat.com>
To: Jan Kasprzak <kas@fi.muni.cz>
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 13:46:16 +0200 [thread overview]
Message-ID: <20120605114616.GB14536@x2.net.home> (raw)
In-Reply-To: <20120529114518.GI1744@fi.muni.cz>
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.
> 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>
> 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.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-06-05 11:46 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 [this message]
2012-06-05 14:08 ` H. Peter Anvin
2012-06-05 14:26 ` Jan Kasprzak
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=20120605114616.GB14536@x2.net.home \
--to=kzak@redhat.com \
--cc=hpa@zytor.com \
--cc=kas@fi.muni.cz \
--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).