LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-21-2005, 03:53 AM   #1
lg3
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
tracing the error code returned by wait call


hi all,

i am calling an exe using execl function using fork system call.
wait call is used to exit the child process.
if there is any error occures wait will return the exit state respective to the error no or exit code.
i am handling errors using WIFEXITED and WEXITSTATUS

if(WIFEXITED(child_status))
{

switch(WEXITSTATUS(child_status))
{
case EXIT_ERR_CODES:
fprintf(log,"%s:localfile error\n",ctime(&t));
break;
}
}

problem is wait returning the exit code but the log is not creting for respective error code.
what could be the problem?

thanx in advance,
g3.
 
  


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
Sub-Process /usr/bin/dpkg returned an error code (1) Bookspoppa Debian 39 11-12-2013 01:21 PM
Sendmail returned error code 111 newlinuxgeek Linux - Software 1 02-14-2008 02:16 AM
dpkg returned an error code (1) Segmentation fault questionman Debian 6 11-02-2004 12:04 AM
Sub-process /bin/rpm returned an error code (255) during uninstall with synaptic DraaX Linux - Newbie 2 02-10-2004 02:05 AM
The program returned an error code (3) Omega Linux - Software 1 05-04-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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