Basic questions on writing a Unix Service (newbie help!)


 
Thread Tools Search this Thread
Top Forums Programming Basic questions on writing a Unix Service (newbie help!)
# 1  
Old 12-06-2006
Basic questions on writing a Unix Service (newbie help!)

Hi there.

I've got 12 years experience writing C++ on Windows, and 3 years C# on Windows. Now my boss wants me to write a C++ app to run on Unix as a multithreaded 'service' (i.e. a program that runs with no user intervention).

Some quick questions for The Experts:

* Whats the best C++ compiler to use? I'm happy with ANSI compliant stuff.
* Whats the best editing/IDE environment to use? Please don't say VI as it's UI makes me ill. Something as close as possible to VS2005 would be nice Smilie
* Is there a special name for a service on Unix? Smilie
* Where would I start in writing a TSR type app (i.e. one that runs in the background on Unix)

Some good 'Unix programming for beginners' literature/websites wouldn't go amiss either.

Thanks in advance!
Gizz. Smilie
# 2  
Old 12-06-2006
1. use POSIX (it's also ANSI) compliant compilers
2. You can write code on a PC, then ftp it to UNIX. You will have to learn basic shell commands. In that mode I use UltraEdit.
3.service=daemon
4. You have to learn something about UNIX system calls (like Windows API) and UNIX processes in general.

This gives you a lot of background and is a free download:
http://www.advancedlinuxprogramming.com/
Don't worry too much about it being linux. 98% of the material works anywhere.

This shows how to write a service (daemon) read the "book" above first.
http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
# 3  
Old 12-06-2006
Thanks Jim, thats just about spot on! (Always wondered what a daemon was...!!!)
# 4  
Old 12-06-2006
Best compiler is always subject to argument, but the freest, most common, and easiest to get is gcc.

The best development environment is not vi. I hate it as much as you do. ...I use nano. Smilie

I remain amazed at the effort people will wring themselves through in order to type text in a white window instead of a black one! The best development environment I know of is the raw makefile; if you have gcc and make, you have everything you need.

If you don't understand makefiles you'll probably find graphical UNIX development environments hell, since they're by and large shells on top of makefiles. See KDevelop.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

some basic unix questions pls iam a newbie

what is a assembler what isa interpreter what is a compiler what is a socket what is a port what is meant by listening to a port how we do it how to know version and standard of unix one is using when one is on public access unix account how to see a jobid in... (1 Reply)
Discussion started by: scimitar
1 Replies

2. UNIX for Dummies Questions & Answers

Basic Newbie question

Hey guys I searched for this for the past few hours but maybe I dont know what the heck I am searching for. I am looking how to locate my .profile and where the heck I can find it to be able to edit it. Thanks in advance. (11 Replies)
Discussion started by: Koopa_Troopa
11 Replies

3. UNIX for Dummies Questions & Answers

Couple of newbie Unix questions

I entered a command at the prompt and it's interactive (not background). It gathers some stats and writes them to a file. I want to see this job running and what it's doing - I/O especially and maybe CPU and stuff. What can do to see this (say using a second session?) I know it's a long job but... (3 Replies)
Discussion started by: ido1957
3 Replies

4. UNIX for Dummies Questions & Answers

some basic questions about unix ..

Hi all today i gone through worst interview of my life that for hour questions were so basic but i never though about them now i am figuring out answers my self but i would appreciate if you ppl help me ... i am listing some of the questions i remember .. 1 ) $ cat a.sh #! /usr/bin/ksh... (4 Replies)
Discussion started by: zedex
4 Replies

5. UNIX for Dummies Questions & Answers

unix questions for newbie

Hi Unix gurus, I know these are some easy questions. But i just want to be sure about them. Hope someone can help explain the following please? 1) if ] - What does the "-r" means? 2) isql -U $DBUSER -D $DBNAME -S $DSQUERY -w 1000 -s";" << testfile > $FILE - What does the -s";" mean and... (1 Reply)
Discussion started by: gholdbhurg
1 Replies

6. UNIX for Dummies Questions & Answers

Basic Unix Questions

OK, here's a question from a true UNIX newb: How does one make a 20 line file? I'm lost. :confused: OK, I figured it out. :D (0 Replies)
Discussion started by: Kitchen Zinc
0 Replies

7. UNIX for Dummies Questions & Answers

basic UNIX questions

Can somebody please tell me a little about UNIX OS. For instance, is it ideal for digital media or how easy is it to get help and support? (3 Replies)
Discussion started by: buk5d
3 Replies

8. Programming

Writing a .NET service to be Hosted in UNIX

Has anyone here written an MS compatible .NET service that is hosted and served from a UNIX server instead of a W2K server? I love programming and writing .NET services with Visual Studio.NET and C#, but there is a fundamental problem --the Win2k server itself. It is not near as reliable as Sun... (0 Replies)
Discussion started by: yeslekmc
0 Replies
Login or Register to Ask a Question