Re: why do processes wait?
From: glen herrmannsfeldt (gah_at_ugcs.caltech.edu)
Date: 08/11/04
- Previous message: Walter Spector: "Re: A question for the developers of g95"
- In reply to: Ron Shepard: "Re: why do processes wait?"
- Next in thread: Dave Thompson: "Re: why do processes wait?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 11 Aug 2004 08:24:56 GMT
Ron Shepard wrote:
(snip)
> I guess what I meant is that I have never seen such an open
> statement fail.
> open(unit=6,file='out.txt')
> write(6,*) 'Hello World'
> end
On my system, the open(2) call can fail with:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an
entire path name exceeded 1023 characters.
[ENOENT] O_CREAT is not set and the named file does not exist.
[ENOENT] A component of the path name that must exist does not exist.
[EACCES] Search permission is denied for a component of the path
prefix.
[EACCES] The required permissions (for reading and/or writing) are
denied for the given flags.
[EACCES] O_CREAT is specified, the file does not exist, and the
directory in which it is to be created does not permit
writing.
[ELOOP] Too many symbolic links were encountered in translating the
pathname.
[EISDIR] The named file is a directory, and the arguments specify it
is to be opened for writing.
[EROFS] The named file resides on a read-only file system, and the
file is to be modified.
[EMFILE] The process has already reached its limit for open file
descriptors.
[ENFILE] The system file table is full.
[ENXIO] The named file is a character special or block special
file, and the device associated with this special file does
not exist.
[EINTR] The open() operation was interrupted by a signal.
[EOPNOTSUPP] O_SHLOCK or O_EXLOCK is specified but the underlying
filesystem does not support locking.
[ENOSPC] O_CREAT is specified, the file does not exist, and the di-
rectory in which the entry for the new file is being placed
cannot be extended because there is no space left on the
file system containing the directory.
[EDQUOT] O_CREAT is specified, the file does not exist, and the di-
rectory in which the entry for the new file is being placed
cannot be extended because the user's quota of disk blocks
on the file system containing the directory has been ex-
hausted.
[EDQUOT] O_CREAT is specified, the file does not exist, and the us-
er's quota of inodes on the file system on which the file
is being created has been exhausted.
[EIO] An I/O error occurred while making the directory entry or
allocating the inode for O_CREAT.
[ETXTBSY] The file is a pure procedure (shared text) file that is be-
ing executed and the open() call requests write access.
[EFAULT] Path points outside the process's allocated address space.
[EEXIST] O_CREAT and O_EXCL were specified and the file exists.
[EOPNOTSUPP] An attempt was made to open a socket (not currently
implemented).
[EINVAL] An attempt was made to open a descriptor with an illegal
combination of O_RDONLY, O_WRONLY, and O_RDWR.
I believe that most of those could happen to Fortran programs.
I believe that a Fortran CLOSE can also fail. One possibility
is that as the buffers are being flushed there is no space
left on the disk.
-- glen
- Previous message: Walter Spector: "Re: A question for the developers of g95"
- In reply to: Ron Shepard: "Re: why do processes wait?"
- Next in thread: Dave Thompson: "Re: why do processes wait?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]