help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system-question


From: Joao Cardoso
Subject: Re: system-question
Date: Sat, 30 Oct 1999 15:37:36 +0100

Mats Jansson wrote:

> John W. Eaton wrote:
>
> > On 29-Oct-1999, Mats Jansson <address@hidden> wrote:
> >
> >| Thanks Joao!
> >| You introduced the command 'fork' to me!
> >|
> >| Unfortunately, a new problem appeared. When I'm killing emacs from the
> >| octave-prompt, everything seems to work. But when I'm killing it from
> >| a function, it becomes a zombie-process.

The reason is that Octave is not aknowledging the dead of its child, emacs.
In the function that I mailed, a line was commented, 'on_signal'. Its
purpose is to define a function to execute or a behaviour on reception of a
signal.
On my .octaverc I have: 'on_signal(18, "SIG_IGN","")' that means: ignore
dead of a child signal.
The 'on-signal' is available on the package tk_octave, but it is very poorly
implemented, although is working fine.

>
> >|
> >| Does anyone have a solution?
> >
> > I think the function you are looking for is called waitpid.
> >
> > jwe
>
> I want to be able to do two things:
> 1) check if the program is still running

waitpid.

>
> 2) close the program from octave

system( kill pid)
waitpid

look for the correct sintax. Doing waitpid after killing the process does
aknowledge the dead of child, and avoids the zombie. In theory, I have not
checked this.

>
>
> I think 'waitpid' is the right command to check if the program is
> still running. But how do I close the program from octave?
>
> Thanks
> Mats
>
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.  To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------

--
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487





---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]