- Subject: [slang-users] Re: need to send signals two times
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Sun, 29 Apr 2007 19:06:16 +0000 (UTC)
Hello John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> =?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> wrote:
>>Does jed (and jed-script) suffer from the same problem? This explains,
>>why my process doesn't read and quit. I think the return from fopen() and
>>the SIGHUP happen nearly at the same time or the return from fopen() a
>>little bit before. So the fopen() is suspended again, but nobody ever
>>does open the pipe.
>
> If you can tell me what you want to happen, I may be able to make
> other suggestions.
I want to spawn a process latex_comm with open_process (in jed) that
creates a fifo and goes into an endless loop of opening, reading and
closing the pipe until it sees the string 'quit'. Than it leaves the
loop, removes the pipe and quits.
http://www.minet.uni-jena.de/~joergs/jjm/latex_comm.sl
The main process (jed) spawns a second process xdvi. xdvi writes infos
to the pipe of latex_comm and instructs this way the main process to
switch to a line and/or buffer.
Upon quit of jed the subprocess latex_comm should also stop. To do this,
jed writes 'quit' into the pipe. But if this is the last thing jed does
latex_comm gets a SIGHUP at the "same time" its fopen() call returns. So
the fopen() is reseted and the process stays alive, while its parent is
gone.
> Do you want the fopen to block until a signal has been received? Do
> you want SIGHUP to cause the process to exit?
No, it should not quit upon SIGHUP. It must remove the pipe.
Bye, Jörg.
--
Der Wunsch, klug zu erscheinen, verhindert oft, es zu werden.
(Francois de la Rochefoucauld)
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]