ts-7000
[Top] [All Lists]

[ts-7000] Re: open("/dev/mem", O_RDWR) returns -1

To:
Subject: [ts-7000] Re: open("/dev/mem", O_RDWR) returns -1
From: "sccjazz1" <>
Date: Tue, 02 Sep 2008 20:41:27 -0000
--- In  "Fred" <> wrote:
>
> --- In "sccjazz1" <sccjazz1@> wrote:
> > The permisions on the executable 
> > are 777, the permisions on /dev/mem 
> > are 777. I can invoke a 'Hello World' 
> > executable just fine via the web page 
> > button.(FYI). The executable is in 
> > the cgi-bin directory.  The problem 
> > is the open("/dev/mem",O_RDWR) 
> > statement returns a -1.
> 
> How about displaying the value of errno
> to see what other information might be
> available?  errno should be one of the
> following problems:
> 
> EACCES 
> The requested access to the file is not allowed, or search 
permission 
> is denied for one of the directories in the path prefix of 
pathname, 
> or the file did not exist yet and write access to the parent 
> directory is not allowed. (See also path_resolution(2).) 
> 
> EEXIST 
> pathname already exists and O_CREAT and O_EXCL were used. 
> 
> EFAULT 
> pathname points outside your accessible address space. 
> 
> EISDIR 
> pathname refers to a directory and the access requested involved 
> writing (that is, O_WRONLY or O_RDWR is set). 
> 
> ELOOP 
> Too many symbolic links were encountered in resolving pathname, or 
> O_NOFOLLOW was specified but pathname was a symbolic link. 
> 
> EMFILE 
> The process already has the maximum number of files open. 
> 
> ENAMETOOLONG 
> pathname was too long. 
> 
> ENFILE 
> The system limit on the total number of open files has been 
reached. 
> 
> ENODEV 
> pathname refers to a device special file and no corresponding 
device 
> exists. (This is a Linux kernel bug; in this situation ENXIO must 
be 
> returned.) 
> 
> ENOENT 
> O_CREAT is not set and the named file does not exist. Or, a 
directory 
> component in pathname does not exist or is a dangling symbolic 
link. 
> 
> ENOMEM 
> Insufficient kernel memory was available. 
> 
> ENOSPC 
> pathname was to be created but the device containing pathname has 
no 
> room for the new file. 
> 
> ENOTDIR 
> A component used as a directory in pathname is not, in fact, a 
> directory, or O_DIRECTORY was specified and pathname was not a 
> directory. 
> 
> ENXIO 
> O_NONBLOCK | O_WRONLY is set, the named file is a FIFO and no 
process 
> has the file open for reading. Or, the file is a device special 
file 
> and no corresponding device exists. 
> 
> EOVERFLOW 
> pathname refers to a regular file, too large to be opened; see 
> O_LARGEFILE above. 
> 
> EPERM 
> The O_NOATIME flag was specified, but the effective user ID of the 
> caller did not match the owner of the file and the caller was not 
> privileged (CAP_FOWNER). 
> 
> EROFS 
> pathname refers to a file on a read-only filesystem and write 
access 
> was requested. 
> 
> ETXTBSY 
> pathname refers to an executable image which is currently being 
> executed and write access was requested. 
> 
> EWOULDBLOCK 
> The O_NONBLOCK flag was specified, and an incompatible lease was 
held 
> on the file (see fcntl(2)).
>

Thank you Fred for responding to my first post.

It was actually what I thought...I had to do a 
chmod +s "executable file"....to allow the web server to
 execute it.

Thank you again, Steve.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU