Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-29-2009, 07:13 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
problems with path variable ( i think)

i have written a program in C, which runs perfect under Kubuntu on my PC.
this program is a uni assignment, so i tried to run it under the uni Planet server, but then i encounter some difficulties...

the assignment is about writing new wrapper function instead of open and read syscalls.
so when i write:
int fd=wrapper_open("config.txt",O_RDONLY,S_IRWXO);
and,while ((read = wrapper_read(fd,buf,1000)) > 0 )
under my Kubuntu works perfect.

but then under Planet it exists on errno:
EFAULT - buf is outside your accessible address space.

i guess its about the variable path.
is it?

p.s. config.txt is a file i wroted and i have the right permissions to read.
PATH is : [ /u/y2006/navehs/bin:/usr/local/bin:/Common/All/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/default/bin:/u/y2006/navehs/bin:. ]
under Planet server

Last edited by shayke23; 04-29-2009 at 07:18 AM.
Old 04-29-2009, 11:48 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

Where/how is buf defined?

Old 05-02-2009, 04:04 AM   #3
LQ Newbie
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Originally Posted by Tinkster View Post
Hi, welcome to LQ!

Where/how is buf defined?

well, it was defined by a local array, but then i changed it to a pointer, and it worked perfect.



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
Add path to $PATH variable alaios SUSE / openSUSE 2 04-19-2009 08:41 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
PATH variable suavecu Linux - Software 11 01-28-2006 12:44 AM
$path variable ? moby Linux - Newbie 3 06-01-2004 03:18 PM
the path variable mjkramer Linux - Newbie 4 10-18-2003 07:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration