This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 100538 - gv issues a misleading error message when asked to open zero-sized file
gv issues a misleading error message when asked to open zero-sized file
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gv (Show other bugs)
rawhide
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Dan Williams
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-23 03:46 EDT by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-19 23:41:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2003-07-23 03:46:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
If gv is asked to open a zero-sized file, it says the file does not exist.

Version-Release number of selected component (if applicable):
gv-3.5.8-23

How reproducible:
Always

Steps to Reproduce:
1.create a zero-sized file named foo.ps
  $ > foo.ps
2.Ask gv to open it:
  $ gv foo.ps


Actual Results:  gv: Cannot open file foo.ps (No such file or directory)


Expected Results:  It should open the file and display a blank page, like it
does for a one-blank-line file.

Additional info:

strace seems to indicate it does fine the file, but it's probably not happy that
it has size zero.  When it has non-zero size, the first stat64 is followed by an
open.

stat64("foo.ps", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat64("foo.ps.ps", 0xbff00be0)           = -1 ENOENT (No such file or directory)
stat64("foo.ps", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(2, "gv: Cannot open file foo.ps (No su"..., 56gv: Cannot open file foo.ps
(No such file or directory)
) = 56
exit_group(1)                           = ?
Comment 1 Dan Williams 2004-09-19 23:41:26 EDT
should be fixed in 3.5.8-26 or later

Note You need to log in before you can comment on or make changes to this bug.