mainghostscript - Support: sr #106912, exit code not returned to shell

 
 

sr #106912: exit code not returned to shell

Submitter:  Dave <blurred_vision>
Submitted:  Wed 24 Jun 2009 06:31:49 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 24 Jun 2009 06:42:13 PM UTC, comment #2: 

One more time for better formatting.

'm running GPL Ghostscript 8.63 on a Redhat 5 box and I'm having issues with the exit code not being returned to the shell.  For instance if I do something like (bogus.pdf does not exist):

gs -q -sDEVICE=tiffg3 -dPDFFitPage -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"


I get the following output:

Error: /undefinedfilename in (bogus.pdf)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1147/1684(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.63: Unrecoverable error, exit code 1


The output says exit code 1 but when I do:

echo "$?"


I get a "0".

I have been able to get a non-zero return code when I do something like removing the output device specification:

gs -q -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"


In this situation, I get the following output:

X connection to localhost:10.0 broken (explicit kill or server shutdown).


Any ideas as to what I'm missing?

Dave <blurred_vision>
Wed 24 Jun 2009 06:38:28 PM UTC, comment #1: 

Something got baked in the formatting of the original post because I assumed I would be able to preview the post before submitting it.  Oh well, let me try again.

I'm running GPL Ghostscript 8.63 on a Redhat 5 box and I'm having issues with the exit code not being returned to the shell.  For instance if I do something like (bogus.pdf does not exist)
:

gs -q -sDEVICE=tiffg3 -dPDFFitPage -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"

I get the following output:

Error: /undefinedfilename in (bogus.pdf)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1147/1684(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.63: Unrecoverable error, exit code 1

The output says exit code 1 but when I do:

echo "$?"

I get a "0".

I have been able to get a non-zero return code when I do something like removing the output device specification:

gs -q -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"

In this situation, I get the following output:

X connection to localhost:10.0 broken (explicit kill or server shutdown).


Any ideas as to what I'm missing?

Dave <blurred_vision>
Wed 24 Jun 2009 06:31:49 PM UTC, original submission:  

I'm running GPL Ghostscript 8.63 on a Redhat 5 box and I'm having issues with the exit code not being returned to the shell.  For instance if I do something like (bogus.pdf does not exist)


gs -q -sDEVICE=tiffg3 -dPDFFitPage -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"



Error: /undefinedfilename in (bogus.pdf)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1147/1684(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.63: Unrecoverable error, exit code 1



echo "$?"

I get a "0".



gs -q -dNOPAUSE -sOutputFile="tmp.tif" -- "bogus.pdf"



X connection to localhost:10.0 broken (explicit kill or server shutdown).


Any ideas as to what I'm missing?

Dave <blurred_vision>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blurred_vision (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code