LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-25-2005, 04:40 AM   #16
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928

I'd be surprised if you ever managed to execute
anything you compiled like that ...

Have a read of man gcc, particularly look at the
meaning of -c as a switch.


Cheers,
Tink
 
Old 05-25-2005, 04:46 AM   #17
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
thx it is fine now...
 
Old 06-11-2005, 01:03 AM   #18
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Thx a lot for your asnwes.. i have some questions concering the code i have found here

http://www.csfalcon.com/index.jsp?topic=UNIX%20Daemon

I have executed your code some times and as i can see the demon procees depends in the child process as u destroy the parent... Are u absolutely sure that this is the best way for implementing this?

Except from these i just want to know

if the following code is necessary
umask(0);

sid = setsid(); /* obtain new process group */
if (sid < 0){
/* error */
}

chdir("/");
/* close input/output of the daemon process */
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);

Why do u need the umask and do u want to obtain a new process group? And finally why do u close the input/output of the daemon process?
Thx a lot.. have a nice week
 
Old 06-12-2005, 02:35 PM   #19
rajashekarnk
LQ Newbie
 
Registered: Jun 2005
Location: harihar
Posts: 1

Rep: Reputation: 0
Question network programs

dear pls help
iam novice but the following problems require source codes.this is my last help i have tried and no body id helping.pls help as many s possible .


------------------------------------------------------------------------------------------------



1.Write a C program for error detecting code: CRC-CCITT and CRC -32.
2.Write a C Program for frame sorting technique used in buffer.
3.Write a C program to implement MLMA Collision free protocol.
4.Write a C program for Transmission flow control protocol- Goback N or Selective repeat.
5.Write a c program to implement security algorithm using wired equivalent privacy.
6.write a c program for private key encryption using DES 64bit key.
7.Write a c program for implementing scheduling techniques using FIFO and Round robin.
8.Write a c program for spanning tree algorithm to find loopless path with 6 to 10 nodes.
9.write a c program for hamming code .
10.Form a HDLC frame using Characer stuffing and bit stuffing .write a c program to find the shortest path in a network of 6 to 10 nodes.
11.write a C program for a)distance vector algorithm to find suitable path for Transmission b) Congestion control using Leaky bucket or Token bucket algorithm.
12.Implement PC to PC Communication
a)using TCP/IP sockets
b)using DES 64-bit key or RSA encrypt data in one node and decrypt in another.
13.Write and Execute c program on linux o.s ,a client and server program to make
a)Client send the name of file.
b)Server to send back contents of requested file if present else send appropriate message.

Using FIFO or Message Queue as the IPC Channed (Processes are running on the same machine)
 
Old 06-12-2005, 08:51 PM   #20
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
rajashekarnk,

Hijacking other peoples threads, and asking us to do our homework fo you are both against our rules. If you have a question to ask please start your own thread. If your question pretains to hw don't bother, we aren't in the business of doing your work for you.

John
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
small syntax problem with C code (implemented in Code Composer Studio) illiniguy3043 Programming 6 01-07-2008 02:14 AM
Different source code (linux kernel) in Win & linux isilinux Linux - General 3 11-01-2007 05:15 PM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
Open Firmware code for booting OS from SATA : sample code available somewhere ? drsparikh Linux - Hardware 0 03-12-2004 11:16 AM
Where to find the linux kernel source code in RH Linux 8? sceadu Linux - Newbie 17 03-20-2003 10:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration