From: Nurdin Premji <npremji@redhat.com>
To: frysk <frysk@sources.redhat.com>
Subject: Re: Command line utilities argument types.
Date: Sat, 09 Jun 2007 17:57:00 -0000 [thread overview]
Message-ID: <4669944E.9060108@redhat.com> (raw)
In-Reply-To: <466090AA.6060507@redhat.com>
Nurdin Premji wrote:
> Andrew Cagney wrote:
>> Nurdin Premji wrote:
>>> I'm going to be refactoring how the command line utilities will
>>> parse their arguments to make them as unified as possible.
>>>
>>> I've identified 4 types of input that can be passed to a command
>>> line utility: Pids, Core files, a command (executable with options),
>>> or nothing.
>>
>> Would these be reported using a callback-interface?
>>
> That is a great idea. I will use 3 callbacks to notify of pids, cores,
> and commands.
> I'm thinking
> parsePid (ProcId pid)
> parseCore (File core)
> parseCommand (String[] command)
>
> I don't know whether the first two should return a single pid/core and
> be called once for every pid/core found or arrays of pid/cores and
> only be called once. The third callback would only ever be called once.
I have extended CommandLineParser in frysk.util to do the above, with
callbacks parsePids(ProcId[] pids) parseCores(File[] coreFiles) and
parseCommand(String[] command).
A CommandLineParser will call only one of these three callback
functions. (There is no mixing of pids with cores withs commands.)
prev parent reply other threads:[~2007-06-08 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 19:12 Nurdin Premji
2007-06-01 19:13 ` Phil Muldoon
2007-06-01 21:33 ` Nurdin Premji
2007-06-01 20:34 ` Nurdin Premji
2007-06-01 21:05 ` Andrew Cagney
2007-06-02 1:10 ` Nurdin Premji
2007-06-09 17:57 ` Nurdin Premji [this message]
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=4669944E.9060108@redhat.com \
--to=npremji@redhat.com \
--cc=frysk@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).