Child-process management in C for ATF

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.

June 21, 2009 · Tags: atf, boost-process, c
Continue reading (about 3 minutes)

Boost.Process and SIGCHLD

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)

Cross-platform development with Parallels

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.

April 2, 2007 · Tags: boost-process, parallels, virtualization
Continue reading (about 2 minutes)

Mac OS X vs. Ubuntu: Introduction

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)

What have I learned during SoC?

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.

August 22, 2006 · Tags: boost-process, soc
Continue reading (about 2 minutes)

Boost.Process 0.1 published

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.

August 21, 2006 · Tags: boost-process, soc
Continue reading (about 1 minute)

Boost.Process tarballs posted

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.

August 17, 2006 · Tags: boost-process, soc
Continue reading (about 1 minute)

SoC: Boost.Process published

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)

SoC: Status report 3

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)

SoC: Playing with Doxygen

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++.

July 26, 2006 · Tags: boost-process
Continue reading (about 2 minutes)

SoC: Status report 2

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.

July 21, 2006 · Tags: boost-process
Continue reading (about 2 minutes)

SoC: Status report

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.

July 13, 2006 · Tags: boost-process
Continue reading (about 2 minutes)

Win32: Mappings for Unicode support

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.

June 14, 2006 · Tags: boost-process
Continue reading (about 2 minutes)

SoC: Accepted, again!

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.

May 24, 2006 · Tags: boost-process
Continue reading (about 3 minutes)

MFC: Developing for Windows

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 "

June 20, 2005 · Tags: boost-process
Continue reading (about 2 minutes)