Here is some information on the build machine I'm using for reference:
-
Dataset
$ dsadm list
UUID OS PUBLISHED URN
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtcK9RaMacrCGw33ALoPDXm85VsmSFe33qg4yjg+/2QWs1ti7HYgS1uCnfuP9/kuYaNK1MbGfk2l1rScSwKv3GP+uyDttKTRQPkLJEmcqaoSv3tjfl1rG44IuKGIGNrcVWGF2/5qGp4r64BRMPzsJi8LSeEAPMulM7KcZLEdXIf1vsBPa8HMFbUUrYIIfI6xzKgOFA2fBedsrVKd+dn+sYb7lRkDWCVmabqHz/Q8nV\ | |
km9tZ/4EHrbHllDicBhCc+wOP+Z7vIk0r2o1Cc4l2ArElVi0F7z8ipAU9jsl3yjfyzhtNdBgiiosgLAwIpHwbsiqVaFqHadqSrcuvDM2PrhVw== jared@basho.com |
==> cluster_info (compile) | |
==> lager (compile) | |
CONFTEST: using inherited require_otp_vsn (default: ".*"): | |
"R13B04|R14" | |
==> poolboy (compile) | |
CONFTEST: using inherited require_otp_vsn (default: ".*"): | |
"R13B04|R14" | |
CONFTEST: using inherited erl_first_files (default: []): | |
["src/gen_nb_server.erl","src/gen_server2.erl"] | |
==> protobuffs (compile) |
If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtcK9RaMacrCGw33ALoPDXm85VsmSFe33qg4yjg+/2QWs1ti7HYgS1uCnfuP9/kuYaNK1MbGfk2l1rScSwKv3GP+uyDttKTRQPkLJEmcqaoSv3tjfl1rG44IuKGIGNrcVWGF2/5qGp4r64BRMPzsJi8LSeEAPMulM7KcZLEdXIf1vsBPa8HMFbUUrYIIfI6xzKgOFA2fBedsrVKd+dn+sYb7lRkDWCVmabqHz/Q8nVkm9tZ/4EHrbHllDicBhCc+wOP+Z7vIk0r2o1Cc4l2ArElVi0F7z8ipAU9jsl3yjfyzhtNdBgiiosgLAwIpHwbsiqVaFqHadqSrcuvDM2PrhVw== jared@basho.com |
[alias] | |
lg80 = "!git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R" |
SmartOS albeit powerful, makes some easy things like figuring out a "version" of SmartOS very difficult and confusing. To someone like Basho who makes packages for SmartOS, it is enough to drive us (me) insane trying to figure out how to label the packages.
The problem lies in trying to define the version at all. Is the version you care about listed in uname -a
? How about a file in /etc/
that tells you? The answer to bolth of those questions is "no". uname -v
gives you a string like joyent_20130125T031721Z
The only file in /etc/
that comes close is pkgsrc_version
, but that is only sometimes available on the system. The real answer is a combination of the Global Zone snapshot version and the pkgsrc version in the guest zones.
So how do I label my packages for SmartOS?
With the uname -v
example above, joyent_20130125T031721Z
describes the global zone, and has some influence on how apps run, but not enough to determine which package will work on which system. Plus I d
........................................ | |
......... .......... | |
....... ........ | |
..... ...... | |
.... ..... | |
... ....... .... | |
.. ....... .. ... | |
. .......... .. .. | |
. ....... .... .. . | |
. ..... ..... . |
I hereby claim:
To claim this, I am signing this object:
edit
@akash-akya pointed out in the comments that the file
module supports named pipes since OTP 20. So none of this post is really needed anymore if you are on >= OTP 21.
The intention of this post is to provide a solution (with examples) to a somewhat uncommon issue in Erlang. I hate searching for answers to the same problems over and over, and I had a hard time finding answers to this particular problem, so I wrote it all down once I figured it out. If one day you decide to read and write data through fifo's (named pipes) and then decide you want to read or write the other end of the pipe from Erlang, this post is for you.