Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

develep UNIX command

Original Message
Name: rayanrayan
Date: November 13, 2006 at 08:13:43 Pacific
Subject: develep UNIX command
OS: os
CPU/Ram: intel /512
Model/Manufacturer: dell/510m
Comment:
You are requested to develop a new UNIX command named “cone” to execute many sub-commands simultaneously. The set of sub-commands to be executed by cone will be provided as command-line arguments. For each command-line argument, cone will create a new process in order to execute the corresponding sub-command. For example, if we type at UNIX’s shell prompt
cone ls ps
cone will create two child processes such that the first child executes “ls” command and the second child executes “ps” command.

An option (-w) can be supplied to enforce cone command to suspend until all sub-commands have been terminated. In this case, a log file “.cone.log” will be generated describing the termination status for each child process. A typical log file might look as follows:

CMD TERMINATION EXIT CODE OR SIGNAL#
ps normal 0
mycode normal 2
prog abnormal 14

cone command should terminate with exit code 0 (zero) if all children processes are successfully forked (when –w option is not specified). Otherwise it should terminate with a non-zero value based on the following table:

Exit code Meaning
1 cone was executed without arguments
2 If cone command fails to fork a new process, the program should terminate directly with exit code 2.
3 A child process was terminated with exit code greater than zero.
4 A child process was terminated abnormally.

If a sub-command requires an option or options then the command name along with its options are surrounded by quotation mark. For example
cone "ls –l -a" "ps –l"

Remarks:
1. Be sure that only the parent process creates all other children processes.
2. If a command-line argument is surrounded by a quotation mark, it will be passed as a single argument.



Report Offensive Message For Removal


Response Number 1
Name: nails
Date: November 13, 2006 at 19:41:29 Pacific
Subject: develep UNIX command
Reply: (edit)
What do you have so far? You'll get more help if you try.

Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: develep UNIX command 

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




My PC has been hijacked!

Lexmark 2600 Printer Issues

btk1w1 infected start here post

Unwanted message remians on screen

Slow boot time


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC