Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1190
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2012-12-24 19:37 -0800 |
| References | (5 earlier) <d4fef961-6eb2-4dac-8ffc-b89cc679297d@googlegroups.com> <a66bd6a2-8b88-4ffa-ae40-b2702b88b6e3@r13g2000vbd.googlegroups.com> <1e6eabe2-d9e0-49c0-926f-11beaab9ee0a@googlegroups.com> <fdfb2faa-a083-46eb-a222-e7154325419c@googlegroups.com> <cfd27480-0dc9-4175-b750-59a2b5ec15c6@b8g2000yqh.googlegroups.com> |
| Message-ID | <307b7d53-9ff3-4dfd-9eb2-fdce16e4bb85@googlegroups.com> (permalink) |
| Subject | Re: How can I overwrite existing files with new input to running Ghostscript?. |
| From | luser- -droog <mijoryx@yahoo.com> |
On Sunday, December 23, 2012 12:16:54 PM UTC-6, SaGS wrote:
> On Dec 23, 5:37 am, Ernie Kent <er...@erniekent.com> wrote:
> > ...
> > > This all works in the sense that the client can send multiple
> > > Postscript files to the server and GS will write each of
> > > them successively to the same jpeg file so that if GS is
> > > terminated at any point the last postscript input sent is
> > > then the image seen in the contents of the jpeg file.
> > >
> > > However, no image is actually written to the file until GS
> > > is terminated.
> > ...
> > 1. If I manually start gs from the shell and enter the commands
> > of your script, there is no write to file until after I stop gs.
> > ...
> I agree with Chris, after the "restore" the outfile should be written
> and closed, unless there's a bug somewhere.
> I used Ubuntu with GS 8.61, and checked open files with "ls -l /proc/
> <pid>/fd". Once GS starts, only stdin/out/err are open. After
> "showpage" I see "out.jpg" opened too. After "restore" (without
>
> quitting GS or doing anything else) "out.jpg" isn't open anymore, and
> I can view the jpeg verifying its contents is what I expect it to be.
> I still suspect you have some trouble with syncing the various
> programs you run.
> You have client(s) <-> daemon <-> gs. The/A client writes some info to
> trigger creating a new jpeg, but it takes time for the daemon to "see"
> that info and write to the pipe that connects it to GS. Then, the
> daemon flushes the write end of the pipe and continues checking for
> new requests from the client(s), but that does not mean GS had a
> chance to read all the code for the 1st request and execute it to
> completion. With your scheme, I don't see how the client can know if/
> when GS actually finished what it had to do (execute everything up to
>
> and including the "restore", and nothing more).
> If it will turn out the problems are with this syncing, then it is not
> something connected to PostScript or Ghostscript.
You could trying having ghostscript write an "I'm done!" message to a named pipe listened to by the "client".
(not tested)
(gsmon.fifo)file dup(EOP\n)writestring closefile
Back to comp.lang.postscript | Previous | Next — Previous in thread | Find similar | Unroll thread
How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-09 10:14 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Helge Blischke <h.blischke@acm.org> - 2012-12-09 22:13 +0100
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-09 13:52 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. "luser.droog" <luser.droog@gmail.com> - 2012-12-09 18:28 -0600
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-09 17:11 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. SaGS <sags5495@gmail.com> - 2012-12-09 20:24 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-10 07:00 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-10 12:39 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Chris <cjl@spamcop.net> - 2012-12-11 10:12 +0000
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-11 11:04 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Chris <cjl@spamcop.net> - 2012-12-12 07:41 +0000
Re: How can I overwrite existing files with new input to running Ghostscript?. SaGS <sags5495@gmail.com> - 2012-12-12 03:52 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Chris <cjl@spamcop.net> - 2012-12-12 12:52 +0000
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-12 08:45 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Chris <cjl@spamcop.net> - 2012-12-13 14:07 +0000
Re: How can I overwrite existing files with new input to running Ghostscript?. SaGS <sags5495@gmail.com> - 2012-12-11 02:44 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-11 11:05 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-11 12:37 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-21 21:40 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. SaGS <sags5495@gmail.com> - 2012-12-22 00:53 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-22 09:00 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Ernie Kent <ernie@erniekent.com> - 2012-12-22 19:37 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. Chris <cjl@spamcop.net> - 2012-12-23 17:16 +0000
Re: How can I overwrite existing files with new input to running Ghostscript?. SaGS <sags5495@gmail.com> - 2012-12-23 10:16 -0800
Re: How can I overwrite existing files with new input to running Ghostscript?. luser- -droog <mijoryx@yahoo.com> - 2012-12-24 19:37 -0800
csiph-web