LinuxQuestions.org
Help answer threads with 0 replies.
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 08-31-2008, 03:02 AM   #1
archieval
Member
 
Registered: Apr 2007
Location: Philippines
Distribution: Kubuntu, Ubuntu, CentOS
Posts: 289

Rep: Reputation: 41
close() system call does not return error?


Hi everyone,

I have experienced this when working in an embedded system linux RTOS, MontaVista Linux 4.0. I tried to hard code the function mapped to my close file operation by returning -1 at the end of the function, but in user space, calling close does not return an error, it returns 0. Is this a probable bug in the above linux distribution?

Best regards.
 
Old 08-31-2008, 04:44 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It doesn't seem so - the value should be returned correctly. However, can you check with a more typical error value like -EBADF?
 
  


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
does a system call return value?? docetes Programming 2 03-16-2006 05:40 PM
Retain Server Connection Up, If Client Break, write system call return SIGPIPE anandss2004 Programming 2 10-24-2005 12:16 AM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
NETPERF: ERROR --> send_udp_stream: error on remote: Interrupted system call dravya Linux - General 1 05-29-2004 05:49 PM
How can get values return from a system call quenn Programming 1 09-16-2003 11:05 PM

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

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