LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2003, 08:10 AM   #1
huno
Member
 
Registered: May 2002
Distribution: Slackware 9.1
Posts: 161

Rep: Reputation: 30
linux and C


I have 2 Questions:

Question 1:

The program first displays a list of commands (ls, pwd, ps) and exit.
It asks the user to select a command he wants to run (exit to terminate the program).
The parent process then creates a child process that executes the selected command. During that time the parent process must wait. Once the child process is finished, the parent process displays the list of commands again and continues as described above.

Questoin 2:

The parent process creates a PIPE and a child process.
The parent process reads a text file (create a file before running the program) and passes the contents of the file (word by word) to the child process through a PIPE.
The child process reads the PIPE and prints only those words which are less than 5 characters long. It also counts such words and displays this count when there is no more data in the pipe. The child process then terminates.
The parent process closes the files and terminates too
 
Old 10-31-2003, 08:20 AM   #2
musrum
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
What are you asking?
 
Old 10-31-2003, 10:11 AM   #3
denominator
Member
 
Registered: Oct 2003
Distribution: Red Hat 9
Posts: 42

Rep: Reputation: 15
Are you asking people to do your homework for you? Thats not going to get you anywhere.
 
Old 10-31-2003, 04:08 PM   #4
afrm
LQ Newbie
 
Registered: Oct 2003
Location: Portugal
Distribution: rh9
Posts: 27

Rep: Reputation: 15
where is the "?" :P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 11:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 11:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 03:49 PM


All times are GMT -5. The time now is 08:15 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration