network/multithreaded programming on FreeBSD

Mike Meyer mwm-keyword-freebsdquestions.8c5a2e at
Mon Jul 30 23:52:29 UTC 2007

On Tue, 31 Jul 2007 00:25:06 +0200 Karol Kwiatkowski <karol.kwiat at> wrote:
> Michael S wrote:
> > Good day all,
> > 
> > I am not sure this is the correct list for my
> > question, I am still going to ask though. 
> > I am a 3rd year computer science student and in the
> > fall I am going to be taking courses in network and
> > system programming (with pthread). As a lot of
> > universities do, mine also teaches these courses on
> > Linux. I was wondering if there was a lot of
> > difference in socket and multi-threaded programming
> > between Linux and FreeBSD?
> > 
> > Thanks in advance,
> > Michael
> Hi Michael,
> I think @hackers might be better place to ask programming questions
> (added to CC).

It certainly liable to get a better answer, because it has a higher
density of programmers hanging out there. I'm not sure it's a better
place to ask programming questions, as it's meant for discussing the
development of FreeBSD, as opposed to development on FreeBSD. On the
other hand, there doesn't seem to be a list for the latter on the list
of freebsd mail lists.....

The answer depends on what your goal is. If you want to write portable
code, both strive to be Posix systems, so if you follow the Posix
guidelines, you'll be ok. Since I develop on several different Unix
platforms including FreeBSD for clients running GNU/Linux (among other
things), that's what I do, and it generally works.

However, if you start straying outside Posix, you'll find
differences. My experience is that Linux tends to be missing features,
but more lenient about transgressions of the standard, than
FreeBSD. On the other hand, my sample set is sufficiently small that
this may not be a good indication of what it's like for others.

Mike Meyer <mwm at>
Independent Network/Unix/Perforce consultant, email for more information.

More information about the freebsd-questions mailing list