Linux
Application
Development

Michael K. Johnson
Erik W. Troan

Source Code

All the full programs in Linux Application Development (the ones with line numbers in the book) have full source code listed here; only the short fragments (without line numbers) are not available online.

We have placed this source code in the public domain. Use it in any project, free or commercial. No rocket science is involved; these programs are all simple demonstrations of system functionality. Of course, we would appreciate some sort of citation if you use a substantial amount of our code in your project, at your complete discretion.

The authors and publisher have taken care in preparation of this source code, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.

The major difference between this source code and the source code in many other books is that we have made an attempt to catch all reasonable errors. If you find that we have missed an error condition that you know for a fact could occur in some situation, or that you have experienced, please send us email at lad-comments@awl.com and give us as many details as possible.

Each file can be retrieved in one of two formats: HTML, which will display nicely on your screen (and if you print it, has the book, authors', and file names at the top so you remember where you found it) and raw text, which is more convenient for downloading for pasting into your own projects.

All the raw source code is also available in a gzipped tarball, for your added convenience. Note: we have received reports that MSIE is in some cases unable to download this file, but in those cases using Netscape has solved the problem.

HTMLRaw Source Code
Makefile Makefile
a.c a.c
broken.c broken.c
broken-fixed.c broken-fixed.c
calc.c calc.c
cat.c cat.c
checkflags.c checkflags.c
daytime.c daytime.c
dbsimple.c dbsimple.c
dircontents.c dircontents.c
gather.c gather.c
globit.c globit.c
hwwrite.c hwwrite.c
id.c id.c
ladsh1.c ladsh1.c
ladsh2.c ladsh2.c
ladsh3.c ladsh3.c
ladsh4.c ladsh4.c
libhello.c libhello.c
loadhello.c loadhello.c
lock.c lock.c
lookup.c lookup.c
map-cat.c map-cat.c
match.c match.c
minopen.c minopen.c
mknod.c mknod.c
monitor.c monitor.c
mpx-blocks.c mpx-blocks.c
mpx-nonblock.c mpx-nonblock.c
mpx-select.c mpx-select.c
passfd.c passfd.c
phones.c phones.c
popenglob.c popenglob.c
ptypair.c ptypair.c
ptytest.c ptytest.c
readpass.c readpass.c
robin.c robin.c
s1.c s1.c
services.c services.c
setflags.c setflags.c
sighup.c sighup.c
slcharset.c slcharset.c
slecho.c slecho.c
slinit.c slinit.c
sockutil.c sockutil.c
statsamp.c statsamp.c
t.c t.c
tclient.c tclient.c
tserver.c tserver.c
uclient.c uclient.c
usehello.c usehello.c
userver.c userver.c
libhello.h libhello.h
ptypair.h ptypair.h
sockutil.h sockutil.h