help-octave
[Top][All Lists]
Advanced

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

Re: Print plot error


From: Ben Abbott
Subject: Re: Print plot error
Date: Mon, 24 Aug 2009 18:53:54 -0400


On Aug 24, 2009, at 5:39 PM, Rob Mahurin wrote:

On Aug 24, 2009, at 5:17 PM, Dmitri A. Sergatskov wrote:
On Sun, Aug 23, 2009 at 12:40 PM, Rob Mahurin<address@hidden> wrote:
I think the solution is an occasional waitpid(-1,0,WNOHANG), but I'm not

I just added
waitpid(-1, 0)
to the end of print() function (in print.m) and that seems to solve the problem.

Again, I am not sure if this is the solution, but at least can be a workaround
for now.

Oh!  I didn't realize waitpid was also an Octave function.

You probably want waitpid(-1,WNOHANG) so that print won't freeze if there is actually no child.

Attached as a patch (which is not a changeset, sorry). This would be good for 3.2.3.

Rob

Regarding the patch, shouldn't WNOHANG be in quotes like below?

+ ## FIXME: we shouldn't leave zombie children, but clean them up if they happen
+  while (waitpid(-1,"WNOHANG"))
+    ## do nothing
+  endwhile

Also what about children that are not zombies? Will such produce an infinite loop?

Regarding the "zombies" does waitpid() kill them or just wait until the die?

Ben





reply via email to

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