LinuxQuestions.org
Visit Jeremy's Blog.
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 11-18-2003, 04:40 AM   #1
swifty99uk
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Is there a Linux Alternative to Spawnl?


Hi, I have some C code built using DJGPP in Windows. I need to call an executable file from within c code and return to that code when the executable has finished. This works fine in windows using spawnl, but I can only find execl in Linux, whixh does not return to the parent.

Any ideas will be greatly appreciated.
 
Old 11-18-2003, 09:37 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
If you call fork() and wait() in the parent process, the child process can run some code then exit. The parent process remains and resumes after the child process terminates. Shell() essentially does fork() and wait() for you.
The only problem with linux shell() is that it doesn't repond to signals, which may or may not be a big deal for you.

That what you want?
 
  


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
Linux Alternative to PC*MILER tmckee Linux - Software 6 03-20-2007 04:40 PM
Need a Linux Alternative to Reason jMon54 Linux - Software 7 09-24-2005 04:03 PM
problems with windows programs in linux (QEMU, WINE, or linux alternative) bulldogzerofive Linux - Software 2 08-18-2005 05:49 PM
Alternative Linux distros? duke4e Linux - Distributions 8 08-12-2005 05:44 AM
Alternative for fraps under linux? Jestrik Linux - Software 0 12-18-2003 04:50 PM

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

All times are GMT -5. The time now is 01:04 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