Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jun 9th, 2008, 4:47 PM   #10
Lakrids
Programmer
 
Join Date: Dec 2007
Posts: 34
Rep Power: 0 Lakrids is on a distinguished road
Re: Cross-platform exec()

Thanks! But does this mean that on UNIX based systems, in cases where you don't have to do anything (or have to wait) for the child to terminate, it is wiser to use system() than doing

c Syntax (Toggle Plain Text)
  1. pid_t pid = fork();
  2. if (pid==0) {
  3. exec(...)
  4. }
  5. else if (pid != -1) {
  6. wait(status);
  7. }

because for one, it is shorter to write , and second, it is cross-platform (which is pretty much my aim)?
Lakrids is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coder's Block Arena - The Game AI Platform Sane Existing Project Development 23 May 6th, 2008 10:12 PM
Which Flavor: CPython or IronPython and Exec Opts Kigneer Python 2 Apr 6th, 2008 11:36 PM
Php with Sun Java System Application Server Platform lucifer PHP 0 Jun 7th, 2007 5:03 AM
Need help from someone who has downloaded microsoft platform sdk rsnd Other Programming Languages 3 Feb 18th, 2006 6:04 PM
Platform Api jstephens C 3 Jan 2nd, 2006 6:17 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:24 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC