- Subject: Re: How to detect when stdout is closed?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Sat, 21 Apr 2007 01:39:50 -0400
=?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> wrote:
>I run a script with open_process(), but my _jed_quit_hooks isn't run
>everytime and due to this some spawned process remain. I use jed-script
>for this processes. How can I detect when stdout or stdin is closed? This
>way the client can quit itself, when Jed doesn't send him a signal
>before.
Is the subprocess a jed-script? If so, you could always try a
variation of this slang code:
parent_pid = getppid ();
.
.
if (-1 == kill (parent_pid, 0))
{
% parent process has exited
exit (1);
}
>In pure SLang I found signal() and I think I could watch out for SIGHUP,
>but jed-script has not signal().
The signal handling functions in slang are not imported by jed because
jed makes extensive use of signals, and in particular catches SIGHUP.
Does this help?
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]