any resource for Linux C++
I need to learn how to deal with threads, daemons and redirection in C++. I'll surely have to learn more about *nix particularly Linux and C++. I'm expecially looking for simple code samples and libraries. A framework of a multi threaded C++ daemon will be a perfect starting. With the exception of http://www.boost.org/ I didn't find anything interesting. Also any pointer to C++ and Linux mailing lists will be welcome. THX
Ivan Sergio Borgonovo wrote:
I need to learn how to deal with threads, daemons and redirection in C++. I'll surely have to learn more about *nix particularly Linux and C++.
Actually, C++ doesn't support threads directly, though you can easily use posix threads with C++ (defined in pthread.h, semaphore.h, etc). Try looking for information on C threads or posix threads and you'll probably find a lot more. You might also look at the fork function (I think that's in unistd.h), which creates new processes rather than new threads. Dor some applications, that's all you need. There are some class libraries, such as Qt, that have built-in C++ thread support. -- JDL Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
On Sat, 03 Jan 2004 21:27:08 +0000
John Lamb
Ivan Sergio Borgonovo wrote:
I need to learn how to deal with threads, daemons and redirection in C++. I'll surely have to learn more about *nix particularly Linux and C++.
Actually, C++ doesn't support threads directly, though you can easily use posix threads with C++ (defined in pthread.h, semaphore.h, etc). Try looking for information on C threads or posix
Do you mean pthread.h, semaphore.h... in C right? Does anyone knows of some wrapper/library in C++ to learn from? Any minimalist example?
There are some class libraries, such as Qt, that have built-in C++ thread support.
It could be a good starting place to look at to see how they build up a C++ version but I don't want to make my code dependent on Qt for a simple daemon. I think the only viable way to learn is to take a book on *nix programming or any good on-line tutorial, learn it in C and write my own C++ wrapper if nothing else is available... and of course look to someone else code.
I need to learn how to deal with threads, daemons and redirection in C++. I'll surely have to learn more about *nix particularly Linux and C++.
I'm expecially looking for simple code samples and libraries.
A framework of a multi threaded C++ daemon will be a perfect starting.
With the exception of http://www.boost.org/ I didn't find anything interesting.
Also any pointer to C++ and Linux mailing lists will be welcome. An excellent book is David Butenhof's book "Programming with POSIX(R) Threads". While this is not a C++ oriented text, it is, IMHO, just about
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 3 Jan 2004 22:10:54 +0100
Ivan Sergio Borgonovo
On Sat, 3 Jan 2004 22:10:54 +0100
Ivan Sergio Borgonovo
I need to learn how to deal with threads, daemons and redirection in C++. I'll surely have to learn more about *nix particularly Linux and C++.
OK... Thanks to ERLUG I've been able to find further interesting info. here there is a tutorial http://dis.cs.umass.edu/~wagner/threads_html/tutorial.html and then there are ACE libs http://www.cs.wustl.edu/~schmidt/ACE.html here you can find Butenhof's code http://www.awprofessional.com/ I think tomorrow I'll be able to write some lines of code and... bother you again ;) THX
participants (3)
-
Ivan Sergio Borgonovo
-
Jerry Feldman
-
John Lamb