Sunday, September 28, 2008

Finding return values from chained pipe commands in the system function

I have already discussed some hints for the usage of the Ruby system method, but encountered another facet of using this system function while passing a bash command using pipes. The problem is that one gets the standard exitcode status back from bash via the $? variable. But when you use pipe to chain more than one command you only get the last command results back from the $? variable.

Enter the PIPEARRAY from bash, which allows you access to the each commands return value in the entire chain. The problem with Ruby is that this is not available after the system function ends. Again, using some  smart Bash you can exit your command chain with the contents of the PIPEARRAY like this:

# a system call that exits with the value of the first command 'make'.
system("make | tee output.log; exit ${PIPESTATUS[0]}")

# examine the returned value of the command 'make'
puts $?.exitstatus

Friday, September 26, 2008

Invitation to influcene Linux World 2008 talk at Jaarbeurs Utrecht

A bit of an update on the talk I will be giving in November at the Dutch Linux World 2008 in the Jaarbeurs Utrecht.

I am going to make you a unique offer. You can influence my talk by leaving a comment on this page up to the date of my presentation. I will do my best to answer any of your questions, discuss anything related to the topic of my talk, and mention any interesting comments I get live at Linux World 2008. You can't beat that for Open Source collaboration!

If you want to stop by and say hi or discuss something interesting with me at Linux World 2008 then just follow the linked banner in the top of this post or the one in the sidebar to register for free.

UPDATE: Presentation now available here.

Monday, September 22, 2008

Some uptime to work on AbTLinux

It has been some time since I was last able to get to work on this project. I am busy with my new job this last year and it has paid off in a promotion! This means I have been given more work to do and this consumes much of my free time (speaking, writing, and developing software commercially can be time consuming too!).

Today I got back to this project and have started up where I left off. I am adding packages to the repository trying to get a base set sorted out. You can follow the action on our Trac site.

I am working towards v0.4, which is months overdue. Maybe time to reset all the deadlines in the milestone view?

I see that I forgot to post the last release notes, v0.3 made it out on the 22nd of May this year. For details see the Trac changeset tagging v0.3.