octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #37591] system with async option results in zo


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #37591] system with async option results in zombie processes
Date: Fri, 22 Sep 2017 02:17:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #4, bug #37591 (project octave):

I made some comments in thread https://savannah.gnu.org/bugs/index.php?52084
about "sh" hangs around after an asynchronous system().  Any insight into
this?  It sort of makes sense that they should be there because Octave is
launching a shell as follows:


  if (pid == 0)
    execl (SHELL_PATH, "sh", "-c", cmd, (char *) (0));


Notice there is nothing in that command that tells the shell (i.e., "sh") to
exit once the command "cmd" is complete.  So, my thinking is that the shell is
just sitting there.  I've attempted a couple things.  One, I tagged ";exit" on
to the end of the command cmd, and two, made the change


    execl (SHELL_PATH, "sh", "-c", "-e", "-i", cmd, (char *) (0));


The -e is supposed to terminate if the system command fails (a good idea, as
the user could type in any nonsensical words).  The -i is to force the shell
to behave interactive, as the -c places the shell into non-interactive state. 
I tried with and without the -i.  Basically, I can't seem to get that shell to
terminate when it seems like it should be easy to do so.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37591>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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