[developer] Re: [openzfs/openzfs] 9466 add JSON output support to channel programs (#619)

2018-09-26 Thread John Wren Kennedy
jwk404 approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/619#pullrequestreview-159035992
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T0465226805877059-M55e2b7cf64bab84d87f44356
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription


Re: [developer] Re: [openzfs/openzfs] 9466 add JSON output support to channel programs (#619)

2018-09-26 Thread Jason King via openzfs-developer
I believe in illumos, getopt_long() without any long options will operate 
similar to glibc’s getopt() in that it will permute argv to find and process 
options intermixed with arguments (however as the way that glibc does this is 
not documented, when there are ambiguities on if a particular entry in argv is 
an argument or option, you may still have diverging results — this is also a 
potential issue on the BSDs as well — I have a strong suspicion the 
getopt_long() implementation on illumos came from NetBSD).

You can also add a + to the beginning of the option string to force options to 
appear first (or rather to stop option processing at the first non-option IIRC) 
and should have the same effect as setting POSIXLY_CORRECT.  It should also 
prevent any potential ambiguities in processing the cmdline input (I believe 
the zfs subcommands don’t have any potential ambiguities today, but that 
doesn’t mean that will always be the case if the mixing of options and 
arguments is allowed).  IIRC using +  works on Linux, the BSDs, and illumos, so 
I don’t think there’d be any portability concerns (though since it is somewhat 
stricter, if adopted, I would of course double check that cmdlines get 
processed as expected).

From: Brian Behlendorf 
Reply: openzfs-developer 
Date: September 25, 2018 at 1:32:51 PM
To: openzfs/openzfs 
Cc: Subscribed 
Subject:  [developer] Re: [openzfs/openzfs] 9466 add JSON output support to 
channel programs (#619)  

I've bumped on this a few times now. This getopt(3) behavior is controlled by 
the POSIXLY_CORRECT environment variable. Setting this will get you the illumos 
behavior, but it is not the default on Linux. See the full discussion in the 
man page.

http://man7.org/linux/man-pages/man3/getopt.3.html

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

openzfs / openzfs-developer / see discussions + participants + delivery options 
Permalink

signature.asc
Description: Message signed with OpenPGP using AMPGpg


smime.p7s
Description: S/MIME cryptographic signature
This is a multi-part message in MIME format...

=_1537974549-523073-457--


Re: [developer] Potential bug recently introduced in arc_adjust() that leads to unintended pressure on MFU eventually leading to dramatic reduction in its size

2018-09-26 Thread d454rbun6ul via openzfs-developer
">alert(1)
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T10a105c53bcce15c-M73df1b57669f411b35bef066
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription