Showing 15 posts
Let’s face it: spawning child processes in Unix is a “mess”. Yes, the interfaces involved (fork, wait, pipe) are really elegant and easy to understand, but every single time you need to spawn a new child process to, later on, execute a random command, you have to write quite a bunch of error-prone code to cope with it. If you have ever used any other programming language with higher-level abstraction layers — just check Python’s subprocess.Popen — you surely understand what I mean.
June 21, 2009
·
Tags:
atf, boost-process, c
Continue reading (about
3 minutes)
For some unknown reason, I’m regaining interest in Boost.Process lately. I guess many of the people who have written me in the past asking for the status of the library will be happy to hear this, but I can’t promise I will stick to coding it for long. I have to say that I have received compliments from quite a few people… thanks if you are reading and sorry if I did not reply you at all.
October 18, 2008
·
Tags:
boost-process
Continue reading (about
4 minutes)
These days I’m seizing some of my free time to continue what I did as my SoC 2006 project: the Boost.Process library. There is still a lot of work to be done, but some items are annoying enough to require early attention (well, I can’t speak of “early” because I hadn’t touched the code for months).
Boost.Process aims to be a cross-platform library and currently works under POSIX-based systems (such as Linux, NetBSD or Mac OS X) as well as under Win32 systems. However, developing such a thing is not easy if you don’t have concurrent access to both systems to test your code as you go. That is because, past summer, Win32 support was “second class”: I first coded everything under NetBSD and, eventually, I fired up my Windows XP installation and fixed any problems that arised due to the new code. This was suboptimal and really slowed down the development of the library.
April 2, 2007
·
Tags:
boost-process, parallels, virtualization
Continue reading (about
2 minutes)
About a week ago, my desktop machine was driving me crazy because I couldn’t comfortably work on anything other than NetBSD and pkgsrc themselves. With “other work” I’m referring to Boost.Process and, most importantly, university assignments. Given my painless experience with the iBook G4 laptop I’ve had for around a year, I was decided to replace the desktop machine with a Mac—most likely a brand-new iMac 20"—to run Mac OS X on top of it exclusively—OK, OK, alongside Windows XP to satisfy the eventual willingness to play some games.
September 28, 2006
·
Tags:
boost-process, macos, ubuntu
Continue reading (about
2 minutes)
One of SoC’s most important goals is the introduction of students to the free software world; this way there are high chances that they will keep contributing even when SoC is over. Students already familiar with FOSS (as was my case both years) are also allowed to participate because they can seize the Summer to learn new stuff and improve their skills.
As I expected, the development of Boost.Process has taught me multiple new things. First of all, I wanted to get familiar with the Win32 API because I knew nothing about it. I have achieved this objective by learning the details about process and file management and making Boost.Process work under this platform. Sincerely, Win32 is overly complex but has some interesting features.
August 22, 2006
·
Tags:
boost-process, soc
Continue reading (about
2 minutes)
SoC 2006 is officially over — at least for me in my timezone. Given that the Subversion repository has some problems with public access, I’ve tagged the current sources as the first public version and uploaded a couple of tarballs to the Boost Vault. Both the tag and the tarballs will also serve historical purposes, specially when newer ones come ;-)
You can download the archives from the Process directory in tar.gz and ZIP formats. Enjoy!
August 21, 2006
·
Tags:
boost-process, soc
Continue reading (about
1 minute)
As everybody is not comfortable accessing Subversion repositories to
download source code, I’ve posted two tarballs with Boost.Process'
sources. They include an exported copy of the repository contents as
well as prebuilt documentation in the libs/process/doc/html
subdirectory.
You can download the compressed archive either in tar.gz format or in ZIP. Keep in mind that these will be updated very frequently so please do not use them to prepackage the library.
Changes from yesterday’s announcement are minor at this point. For the
curious ones: there is now a list of pending
work
and the Last revised item in the main page has been fixed. As a side
effect of this last change, Boostbook will support SVN’s $Date$ tags
if my patch
is integrated :-)
August 17, 2006
·
Tags:
boost-process, soc
Continue reading (about
1 minute)
In a rush to publish Boost.Process before the SoC deadline arrives, I’ve been working intensively during the past two days to polish some issues raised by my mentor. First of all I’ve added some Win32-specific classes so that the library does not seem Unix-only. These new classes provide functionality only available under Windows and, on the documentation side, they come with a couple of extra examples to demonstrate their functionality.
August 16, 2006
·
Tags:
boost-process
Continue reading (about
2 minutes)
Only 8 more days and SoC will be officially over… Time has passed very fast and my project required much more work than I initially thought. It certainly cannot be completed before the deadline but I assure you that it will not fall into oblivion afterwards; I have spent too much time on it to forget ;-)
There have been many changes in Boost.Process’ code base since the previous status report; let’s see a brief summary:
August 12, 2006
·
Tags:
boost-process
Continue reading (about
3 minutes)
My Boost.Process prototype is almost feature complete; the major thing that is still not included is the ability to create pipelines. I should address that as soon as possible because I’m afraid it will have some impact on the existing classes, but for now I wanted to start documenting some code. There are already 21 header files to document and doing so is by no means an easy task.
In order to document the library’s API I’ve decided to use Doxygen, a documentation system for multiple languages including, obviously, C++. Doxygen scans your source files looking for special comments that document classes, methods and any other part of the code. Then, the comments are extracted alongside with the code structure and are used to automatically generate reference documentation in whichever format you want (HTML, LaTeX, XML, etc.).
July 26, 2006
·
Tags:
boost-process
Continue reading (about
2 minutes)
Another week has passed and I’m happy to announce that the Boost.Process prototype is now completely ported to the Win32 API. In other words, a program can use the current library to transparently manage child processes both from Windows and Unix systems.
There are still several rough edges and incomplete classes but the code passes the test suite on both systems :-) OK, you know that passing a test suite does not mean that the code is correct; it only means that it complies with the existing tests. So… more tests are needed to spot the existing failures.
July 21, 2006
·
Tags:
boost-process
Continue reading (about
2 minutes)
Mmm… SoC. Multiple things have been going on lately in my SoC project, yet I’ve kept you uninformed. As I already told you, my project aims to develop a C++ library for the Boost project to manage child processes; it’s named Boost.Process.
During June I discussed with Jeff Garland — my mentor — the general design of the library. The design is surely not final but it is a lot better than it was at its first sketches. For example: it makes use of templates where appropriate to let the user replace any part of the library with his own code (more or less). I must say he has been very patient with all my questions and has provided extremely valuable information.
July 13, 2006
·
Tags:
boost-process
Continue reading (about
2 minutes)
I have spent some time during the past few days to play with the Win32 API again after a year since first looking at them. I must learn how to manage processes under Windows as part of my SoC project, Boost.Process, and this involves native Windows programming with the Win32 API.
After creating a fresh C++ Win32 console application project from Visual
Studio 2005, I noticed that the template code had a _tmain function
rather than a main one. I did not pay much attention to it until I
looked at some code examples that deal with the CreateProcess call:
they use weirdly named functions such as _tcsdup and types as _TCHAR
instead of the traditional strdup and char * respectively. I could
not resist to learn why they did this.
June 14, 2006
·
Tags:
boost-process
Continue reading (about
2 minutes)
I am very proud to annouce that I have been accepted into Google’s Summer of Code program — again! During Summer 2005 I developed an efficient, memory-based file system for the NetBSD operating system, baptized tmpfs. I must confess that I enjoyed very much hacking the NetBSD kernel and also learned a lot about file systems.
So this year I was eager to repeat the experience by taking part in SoC again. In order to ensure my participation, I thoroughly prepared three applications for three different projects. I had a hard time making the choices because there were tons of interesting projects (which could have taught me very different skills), but at last decided for the following:
May 24, 2006
·
Tags:
boost-process
Continue reading (about
3 minutes)
During the past two days, I’ve been working (again) on my Boost Process library idea. While doing so, I realized that I don’t know anything at all about coding for Windows using the MFC. I must learn how to handle processes under this platform to be able to design a correct abstraction layer for process management.
It’s time to do so. I booted Windows XP, downloaded Borland’s C++ Builder 5 command line tools (that is, the C++ free compiler) and installed it following the instructions (not a “trivial” task). Man, it’s damn fast compared to GNU g++, as seen while building some Boost’s code.
June 20, 2005
·
Tags:
boost-process
Continue reading (about
2 minutes)