#563 closed defect (fixed)
psFitsOpenFD and psFitsOpenStream not CFITSIO-compatible
| Reported by: | Owned by: | jhoblitt | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
CFITSIO offers no file-access routine that allows the use of a file-descriptor or C FILE stream.
I suggest that these functions be removed from the SDRS and psLib API.
-rdd
Change History (4)
comment:1 by , 21 years ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
comment:2 by , 21 years ago
Gene and I are aware of this limitation in cifsio. These functions are to be
provided for convenience in dealing with that 'limitation'. You can use fstat()
to get the filename of an open FD and fileno() can get the FD from a FILE stream.
comment:3 by , 21 years ago
So, how exactly do you use fstat to get the filename from the file descriptor?
The fstat function returns a structure, but none of the members of that struct refers to a filename. That
makes sense to me, as a file descriptor can refer to more than a regular disk file, i.e, a pipe or socket,
which doesn't have a 'filename' so-to-say.
Even if I get get ahold of a filename, assuming the fd refered to a regular disk file, I'd have to reopen
the file and not even use the fd, which you had problems with already with psLog. There really is no
good solution for this, I think.
-rdd
comment:4 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
These functions have been dropped from the API.

Perhaps Josh or Gene can provide a prototype, or some direction?