Re: network/multithreaded programming on FreeBSD

2007-07-30 Thread Mike Meyer
On Tue, 31 Jul 2007 00:25:06 +0200 Karol Kwiatkowski <[EMAIL PROTECTED]> 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.

   http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: network/multithreaded programming on FreeBSD

2007-07-30 Thread Karol Kwiatkowski
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).

Cheers and good luck with your course!

Karol


-- 
Karol Kwiatkowski   
OpenPGP 0x06E09309



signature.asc
Description: OpenPGP digital signature


Re: network/multithreaded programming on FreeBSD

2007-07-30 Thread Pieter de Goeje
On Monday 30 July 2007, 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?
Hello,

Pthreads is a standardized interface available on both Linux and FreeBSD, so 
there should not be any differences between them. Likewise for sockets. The 
only really minor difference I can think of right now is the sa_len member of 
struct sockaddr which is available on FreeBSD but not on Linux.

The cool thing about FreeBSD is that everything you need to program is already 
installed :)

Cheers,

Pieter de Goeje

>
> Thanks in advance,
> Michael


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"