<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jd&#039;s &#187; en</title>
	<atom:link href="http://disjunkt.com/jd/t/en/feed/" rel="self" type="application/rss+xml" />
	<link>http://disjunkt.com/jd</link>
	<description>/usr/[misc&#124;share]/*</description>
	<lastBuildDate>Thu, 09 Jan 2014 13:35:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>macports and upgrading to mavericks</title>
		<link>http://disjunkt.com/jd/2013/en/macport-and-upgrading-to-mavericks-376/</link>
		<comments>http://disjunkt.com/jd/2013/en/macport-and-upgrading-to-mavericks-376/#comments</comments>
		<pubDate>Sun, 08 Dec 2013 15:55:41 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[quality]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=376</guid>
		<description><![CDATA[This is mainly a reminder of some light troubles encountered whilst upgrading from moutain-lion to mavericks.
Certainly, many people could be concerned because Apple decided to give this upgrade for free (which is a good turn in my opinion).
Most of the troubles come from the upgrade process, a fresh maverick installation might have much less problems.

upgrading [...]]]></description>
			<content:encoded><![CDATA[<p>This is mainly a reminder of some light troubles encountered whilst upgrading from moutain-lion to mavericks.<br />
Certainly, many people could be concerned because Apple decided to give this upgrade for free (which is a good turn in my opinion).<br />
Most of the troubles come from the upgrade process, a fresh maverick installation might have much less problems.</p>
<li>
<h2>upgrading xcode</h2>
</li>
<p>Using the App Store to download Xcode-5.0.2 isn&#8217;t enough, one has to select the proper command-line tools. Now the trouble with upgrading is that invoking<br />
&#8220;<strong>xcode-select &#8211;install</strong>&#8221;<br />
right after the upgrade won&#8217;t work. <a href="https://trac.macports.org/ticket/41042#comment:9">I personally had to shut down the machine and restart the OS</a> in order to get it to pop-up the selection window &#8230; (probably a reminder of the previous Xcode ?)<br />
The most tricky point with that strange behaviour of xcode is that most build will be okay, probably because of older binaries or<br />
settings of previous xcode being used, but some package will definitely be reluctant (ex: <a href="https://trac.macports.org/ticket/41042#comment:8">openmotif</a>) ; so<br />
check carefully that step before continuing further.</p>
<li>
<h2>upgrading macports</h2>
</li>
<p>There is a <a href="https://trac.macports.org/wiki/Migration">complete documentation</a> for this, particularly about saving the list of port installed.<br />
Now, when running into a lot of troubles, one will probably go fast and might forget some steps. Or rather, like it occurred to me, partially crash the previous install by trying a <strong>port selfupdate</strong> right after the OS upgrade !<br />
Anyhow I backed-up the former port tree and some off the apps installed:</p>
<pre>
mv /opt/local /opt/local-OLD
cd /Applications/Macports &#038;&#038; for NOM in * ; do mv "${NOM}" "${NOM}-"`date '+%Y%m%d-%H%M'` ; done
</pre>
<p>From that point, whenever the old list of ports was needed, I used the following ugly trick :</p>
<pre>
sqlite3 -line /opt/local-OLD/var/macports/registry/registry.db "select * from ports" | grep 'name =' | sed 's/^.*name = //' | sort -u
</pre>
<p>At this point, with nothing in the way anymore, I simply downloaded macports-2.2.1-10.9 and followed the regular install.<br />
But at this point, in order to <a href="https://trac.macports.org/ticket/41196"> work around some bugs</a>, some trick was needed &#8230;</p>
<li>
<h2>Tuning the macports&#8217; builds [edit : not needed since <a href="https://trac.macports.org/ticket/41196#comment:14">release @114492 </a>]</h2>
</li>
<p>Some packages need the libtool .la files in order to build (for dependencies calculations ?), but the current macports doesn&#8217;t<br />
install them anymore. Yet, I don&#8217;t have any other workaround than keeping the whole build and parse them back for those .la files.<br />
So we must instruct macports to keep the build trees : tune the <strong>/opt/local/etc/macports/macports.conf</strong> with</p>
<pre>
portautoclean           no
</pre>
<p>Probably at some point, some cleaning will become mandatory in order to free space.</p>
<li>
<h2>the lib*.la troubles [edit : not needed since <a href="https://trac.macports.org/ticket/41196#comment:14">release @114492 </a>]</h2>
</li>
<p>Most port builds won&#8217;t need the libtool&#8217;s *.la files, and some build will crash with DYLIB path injections. However some build will<br />
choke explicitely on missing lib*la files.<br />
I simply used this uggly script in order to copy some parsed .la files from the build-trees :</p>
<pre>
#!/bin/bash

ls -ctr `find /opt/local/var/macports/build/ -name 'lib*.la' -type f` | while read LIBLA
do
    SHORTNAME=`echo ${LIBLA} | rev | cut -d/ -f1 | rev | sed 's/\.la$//'`
    if [ ! -f "/opt/local/lib/${SHORTNAME}.la" ]
    then
        sed 's#/opt/local/var/macports/build[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*/\(lib[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*\.la\)#/opt/local/lib/\1#g' < "${LIBLA}"  > "/opt/local/lib/${SHORTNAME}.la"
    fi
done
</pre>
<p>The best being probably to move those out of the way right after the build of the &#8220;la-needing&#8221; packages, but keep them for future use :</p>
<pre>
mkdir /opt/local/libla &#038;&#038; mv /opt/local/lib/lib*.la /opt/local/libla
</pre>
<li>
<h2>forcing install of dbus</h2>
</li>
<p>dbus port may fail from previous install, in which case a simple <strong>port install -f dbus</strong> will do the trick.</p>
<li>
<h2>upgrading ddd and gdd</h2>
</li>
<p>The new ddd isn&#8217;t necessarly fully compatible with the previous release, I had to remove the <strong>~/.ddd</strong> directory in<br />
order to get a new clean one ; otherwise ddd was stuck waiting for gdb to answer.</p>
<pre>
mv ~/.ddd ~/.ddd-`date '+%Y%m%d-%H%M'`
</pre>
<p>The 5.0.2 version of xcode doesn&#8217;t include the <strong>gdb debugger</strong> anymore, and the <strong>ddd</strong> port doesn&#8217;t yet depend on gdb. a simple <strong>port install gdb</strong> will provide a new one.<br />
Now for some reason, the gdb port-provided is called <strong>ggdb</strong>, so ddd won&#8217;t find it right out. Two solutions here :<br />
either invoke ddd session with :</p>
<pre>
ddd --debugger /opt/local/bin/ggdb [args]
</pre>
<p>or tune the ressource file for the proper gdb name, <strong>~/.ddd/init</strong> :</p>
<pre>
! addition to locate and use the macports supplied gdb :
Ddd*debuggerCommand: /opt/local/bin/ggdb

! DO NOT ADD ANYTHING BELOW THIS LINE -- DDD WILL OVERWRITE IT
Ddd*dddinitVersion: 3.3.12
.../...
</pre>
<li>
<h2>conclusion</h2>
</li>
<p>Finally, the vast majority of ports do build flawlessly, confirming the quality of those sources and the work of macports authors !</p>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2013/en/macport-and-upgrading-to-mavericks-376/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tempelhof</title>
		<link>http://disjunkt.com/jd/2012/en/tempelhof-372/</link>
		<comments>http://disjunkt.com/jd/2012/en/tempelhof-372/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 11:34:50 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[quality]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=372</guid>
		<description><![CDATA[
one should scroll to the left, and then to the right.
]]></description>
			<content:encoded><![CDATA[<p><script src="http://zoom.it/YF8Q.js?width=auto&#038;height=400px"></script><br />
one should scroll to the left, and then to the right.</p>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2012/en/tempelhof-372/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Makhtesh Ramon, moonless night.</title>
		<link>http://disjunkt.com/jd/2011/en/makhtesh-ramon-moonless-night-298/</link>
		<comments>http://disjunkt.com/jd/2011/en/makhtesh-ramon-moonless-night-298/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 11:23:20 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[galaxy]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=298</guid>
		<description><![CDATA[Makhtech Ramon is a huge erosion valley in the middle of negev desert. Stepping into a desert is really something worth trying, you'll have the sensation of being invited by nature to shortly visit a place where humans are not really supposed to be.]]></description>
			<content:encoded><![CDATA[<div id="attachment_297" class="wp-caption alignleft" style="width: 300px"><a href="http://disjunkt.com/horiz/mitspe-galact9.jpg"><img class="size-full wp-image-252" title="our galaxy as seen from makhtech-ramon" src="http://disjunkt.com/jd/wp-content/uploads/2011/08/mitspe-galact9-290.jpg" alt="our galaxy as seen from makhtech-ramon" width="290" height="175" /></a><p class="wp-caption-text">our galaxy as seen from makhtech-ramon</p></div>
<p>Makhtech Ramon is a huge erosion valley in the middle of negev desert. Stepping into a desert is really something worth trying, you&#8217;ll have the sensation of being invited by nature to shortly visit a place where humans are not really supposed to be.</p>
<p>Already, during daylight, embracing the &#8220;crater&#8221; as a whole from it&#8217;s edge is stunning. The light is strong and tend to blur everything in the distance, but precisely distances ar big : 10k wide 40km long &#8230;</p>
<p>Though, the numerous geological variations brought by erosion set an incredible complex map. 300m cliffs on the sides are the only remain of what use to be a dome above. Inside, the intricate patch of colors tells us about black for basalts or even cooked limestones, red for oxyded layers of  lime, sometime up to green for some clays.</p>
<div id="attachment_302" class="wp-caption alignright" style="width: 650px"><a href="http://disjunkt.com/horiz/martech-ramon1.jpg"><img class="size-full wp-image-302" title="makhtesh ramon" src="http://disjunkt.com/jd/wp-content/uploads/2011/09/martech-ramon1-640.jpg" alt="makhtesh ramon" width="640" height="93" /></a><p class="wp-caption-text">makhtesh ramon - click and get lost into it, zoom as much as you can !</p></div>
<div id="attachment_310" class="wp-caption alignright" style="width: 650px"><a href="http://disjunkt.com/horiz/crete2.jpg"><img class="size-full wp-image-310" title="makhtesh-ramon - south cliff" src="http://disjunkt.com/jd/wp-content/uploads/2011/09/crete2-640.jpg" alt="makhtesh-ramon - south cliff" width="640" height="84" /></a><p class="wp-caption-text">makhtesh-ramon - south cliff</p></div>
<p>The cauldron is inviting you to dive in.</p>
<p>A further step is to have a small nightly walk, without any disturbing light, and possibly without moonlight. The first surprise is that the star&#8217;s glow is strong enough to have a slow walk in those rocks. A few second after leaving the camp lights, the surprise is the arch of the milky way. Words from my five years old son : &#8220;it&#8217;s like fireworks, but suspended !&#8221;.</p>
<p>The image above pictures a horizon to horizon mosaic of 15 seconds-long shots, which is of course more than what naked eye can see. It&#8217;s somehow close to the seeing of myriad of stars you&#8217;ll get when at a remote dark place. Next to the left cliff, you can also find our neighbourg the andromedae galaxy.</p>
<p>Click on the <a href="http://disjunkt.com/horiz/mitspe-galact9.jpg">mosaic</a> for full size and more.</p>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2011/en/makhtesh-ramon-moonless-night-298/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>James Lick refractor</title>
		<link>http://disjunkt.com/jd/2011/en/astronomy/james-lick-refractor-272/</link>
		<comments>http://disjunkt.com/jd/2011/en/astronomy/james-lick-refractor-272/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 17:20:02 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[creative common]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=272</guid>
		<description><![CDATA[a small blog entry to host the full-size original of this pic taken when I passed by mount hamilton and bumped into one&#8217;s child dream. this pic is currently illustrating wikipedia&#8217;s James Lick telescope entry. One may use it, conforming with Creative Commons attribution license.
]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_280" class="wp-caption alignleft" style="width: 302px"><a href="http://disjunkt.com/jd/wp-content/uploads/2011/06/dsc_7862b.jpg"><img src="http://disjunkt.com/jd/wp-content/uploads/2011/06/dsc_7862b292.jpg" alt="James Lick refractor" title="James Lick refractor" width="292" height="194" class="size-full wp-image-280" /></a><p class="wp-caption-text">James Lick refractor (click for full size)</p></div>a small blog entry to host the full-size original of this pic taken when I passed by mount hamilton and bumped into <a href="http://www.flickr.com/photos/yorgda/3259519315/">one&#8217;s child dream</a>. this pic is currently illustrating wikipedia&#8217;s <a href="http://en.wikipedia.org/wiki/James_Lick_telescope">James Lick telescope</a> entry. One may use it, conforming with <a href="http://creativecommons.org/licenses/by/2.0/">Creative Commons attribution license</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2011/en/astronomy/james-lick-refractor-272/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>multiseat linux : system-wide pulseaudio for routing sounds</title>
		<link>http://disjunkt.com/jd/2010/en/multiseat-linux/multiseat-linux-system-wide-pulseaudio-for-routing-sounds-109/</link>
		<comments>http://disjunkt.com/jd/2010/en/multiseat-linux/multiseat-linux-system-wide-pulseaudio-for-routing-sounds-109/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 22:19:57 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[multiseat linux]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=109</guid>
		<description><![CDATA[When using a multi-seat linux &#8211; multiseat : I really mean there are several users using one machine with numerous keyboards, mice and screens, each user having its own X at the same time &#8211; it used to be rather difficult to route sounds towards the proper output devices, or even to share the (very [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://disjunkt.com/jd/wp-content/uploads/2010/04/dualh2.jpg"><img src="http://disjunkt.com/jd/wp-content/uploads/2010/04/dualh2.jpg" alt="many users - one machine" title="dualh2" width="290" height="230" class="alignright size-full wp-image-126" /></a></a>When using a multi-seat linux &#8211; <em>multiseat : I really mean there are several users using one machine with numerous keyboards, mice and screens, each user having its own X at the same time</em> &#8211; it used to be rather difficult to route sounds towards the proper output devices, or even to share the (very often only) available sound card ; <strong><em>pulseaudio system-wide daemon</em></strong> is an elegant solution &#8230;</p>
<p>Obviously any process wants its  own sound device. That&#8217;s why sound servers were introduced after the inititial oss design. From the past, I used to tweak <a href="http://disjunkt.com/dualhead/bruby-dualhead.html">multiseat configs</a> a lot with every last trend of sound servers, oss, esd, alsa, even tried jackd which isn&#8217;t really suited for general use. Finally, when I switched from debian to ubuntu for desktop use, I took a glance at pulseaudio.</p>
<p>Pulseaudio has one main point against the others : it is ubuntu&#8217;s current choice and it comes with a rather simple and convenient front-end for setting processes sound-volume individually (pavucontrol &#8211; Pulse Audio Volume Control).</p>
<p>With the multiseat constraints, I could not get a decent stable system keeping the initial <em>per-user</em> design ; this document mainly details most tricks needed to switch from a <em>per-user</em> to a <em>system-wide</em> pulseaudio daemon.</p>
<h3>/etc/default/pulseaudio</h3>
<p>The system-wide daemon is started once for all at the starting of the machine by it&#8217;s <strong>/etc/init.d/pulseaudio</strong> startup script.</p>
<pre>PULSEAUDIO_SYSTEM_START=1</pre>
<h3>/etc/group</h3>
<p>One main trouble when sharing sound devices is all those old binaries that try to steal <strong>/dev/dsp</strong> one to each other, but the same trouble may occur on <strong>/dev/snd/*/*</strong> device files ; that&#8217;s why I finally choosed to</p>
<ul>
<li>remove all users from <strong>audio</strong> group except <strong>pulse</strong></li>
<li>put back all users into <strong>pulse-access</strong> group</li>
</ul>
<p>this way, stealing to each other is much more difficult (though pulseaudio daemon is a setuid application so some more has to be done, see below).</p>
<h3>/etc/pulse/system.pa</h3>
<pre>load-module module-alsa-sink device="front:Intel" sink_name=global
load-module module-remap-sink sink_name=big channels=2 channel_map=right,left master_channel_map=right,left remix=no
load-module module-remap-sink sink_name=small channels=2 channel_map=right,left master_channel_map=rear-left,rear-right remix=no
; those three lines permit splitting a unique common multi-channel sound card to a pair of stereo sinks
; one using the front jack, the other the rear output jack.

.../...

# pulseaudio system-wide deamon keep the sound card for himself ...
# load-module module-suspend-on-idle</pre>
<h3>/etc/pulse/daemon.conf</h3>
<pre># on my box, 2.6.33 introduced some troubles around there ...
no-cpu-limit = yes
# this one is for enabling four channel on the global sink (for watching movies ?)
default-sample-channels = 4</pre>
<h3>/etc/pulse/client.conf</h3>
<pre>; don't let user launch pulseaudio deamons at need, there's already one
autospawn=no</pre>
<h3>/etc/profile.d/pulseaudio-client.sh</h3>
<p>as the environment variable <strong>$PULSE_SINK</strong> takes precedence over global or file tunings, another entry into <strong>/etc/profile.d</strong> sounds efficient :</p>
<pre>#!/bin/sh

# in oder to match a screen-set to a pulseaudio sink :
# pour le cas ou l'on veut faire correspondre a un terminal un canal pulseaudio :
if [ "$DISPLAY" ]
then
    if [ "$DISPLAY" = ":0" ]
    then
        PULSE_SINK="big"
    fi
    if [ "$DISPLAY" = ":1" ]
    then
        PULSE_SINK="small"
    fi
fi</pre>
<p>this script has to be usable by anyone :</p>
<pre># chmod 755 /etc/profile.d/pulseaudio-client.sh</pre>
<h3>update all ~users/.asoundrc</h3>
<p>I confess I&#8217;m not (yet) sure for that one, I should start over with a clean ubuntu to check about it, anyway it shouldn&#8217;t hurt much : for each user, play :</p>
<pre>&gt; asoundconf set-pulseaudio</pre>
<p>in order to get a default <em>alsa</em> mapping to <em>pulse</em>.</p>
<h3>~/.pulse/client.conf</h3>
<p>Any user may have its own additional settings, but should take care of eventually erasing the <strong>$PULSE_SINK</strong> var if needed (for example, my children have sound following their seats whilst I always have the big loudspeakers).</p>
<pre>default-sink=small
; probablement mieux de ne pas avoir de pulseaudio lancés par les users
autospawn=no</pre>
<h2>there we are</h2>
<p>Eventually <strong>/etc/group</strong> changes won&#8217;t be effective before X-session endings, the system-wide daemon has to be launched after killing anything in the way to soundcards, but at this point things should work, no more &#8220;release the sound for me please&#8221; battleground !</p>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2010/en/multiseat-linux/multiseat-linux-system-wide-pulseaudio-for-routing-sounds-109/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>on the way to C++ (unix-)daemons &#8230; : FILE* to iostream</title>
		<link>http://disjunkt.com/jd/2010/en/cplusplus/on-the-way-to-cpp-unix-daemons-file-to-iostream-25/</link>
		<comments>http://disjunkt.com/jd/2010/en/cplusplus/on-the-way-to-cpp-unix-daemons-file-to-iostream-25/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 09:41:39 +0000</pubDate>
		<dc:creator>jd</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://disjunkt.com/jd/?p=25</guid>
		<description><![CDATA[turning FILE* into iostream]]></description>
			<content:encoded><![CDATA[<p>Writing a unix daemon using C++, the idea might seem odd. But it&#8217;s desirable in many ways&nbsp;:</p>
<ul>
<li>C++ provides a lot of methods which are inherently safe and neat regarding string treatments,</li>
<li><a href="http://en.wikipedia.org/wiki/Standard_Template_Library">STL</a><a href="http://www.sgi.com/tech/stl/">(sgi)</a> provides a lot of nice containers, particularly the associative map,</li>
<li>convenient simple text input/output using iostream &#8230;</li>
</ul>
<p>Now, coding a daemon implies a lot of very unix-native C details such as : properly detach from terminals, output some errors via syslog &#8230;</p>
<p>When one realises all those functionnalites have simple posix-C functions to take care of, a very convenient bridge from C to C++ is to bind a regular iostream to a FILE* descriptor.</p>
<p><strong>Example : reading from a pipe using istream</strong><br />
The below posix-C function :</p>
<pre>FILE *popen(const char *command, const char *type);</pre>
<p>provides a very simple way to fork and read to (or write from) another process.  The <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_io.html">gnu iostream library documentation</a> mentions some methods usable to turn FILE* into stream, but I would not say the said documentation made it straighforward. So here&#8217;s an example of such a pipe :</p>
<pre>#include &lt;errno.h&gt;
#include &lt;string.h&gt;     // strerror

#include &lt;iostream&gt;
#include &lt;ext/stdio_filebuf.h&gt;  // __gnu_cxx::stdio_filebuf

using namespace std;

void filter_uggly_uppercase (istream &amp;in, ostream &amp;out) {
    char c;
    while (in &amp;&amp; in.get(c)) {
        if ((c&gt;='a') &amp;&amp; (c&lt;='z'))
            out &lt;&lt; (char)('A' - 'a' + c);
        else
            out &lt;&lt; c;
    }
}

int main (void) {
    const char *command = "find . -type f";

    FILE *f_pipe_in = popen (command, "r");
    if (f_pipe_in == NULL) {
        int e = errno;
        cerr &lt;&lt; "error at piping from " &lt;&lt; command &lt;&lt; " : " &lt;&lt; strerror (e) &lt;&lt; endl;
        return 1;
    }

    // let's build a buffer from the FILE* descriptor ...
    __gnu_cxx::stdio_filebuf&lt;char&gt; pipe_buf (f_pipe_in, ios_base::in);

    // there we are, a regular istream is build upon the buffer :
    istream stream_pipe_in (&amp;pipe_buf);

    // let's read from that pipe now, the usual way ...
    filter_uggly_uppercase (stream_pipe_in, cout);

    pclose (f_pipe_in);

    return 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://disjunkt.com/jd/2010/en/cplusplus/on-the-way-to-cpp-unix-daemons-file-to-iostream-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
