Branch: Tag:

2007-06-07

2007-06-07 13:51:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Don't keep the signalling pipe in the watchdog.
This will probably fix the case when the testsuite hangs on detached watchdogs.

Rev: bin/test_pike.pike:1.110

1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.109 2006/06/16 16:26:41 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.110 2007/06/07 13:51:23 grubba Exp $ */      #if !constant(_verify_internals)   #define _verify_internals()
411: Inside #if defined(WATCHDOG)
      if(use_watchdog && !forked)    { +  object watchdog_tmp;   #ifdef WATCHDOG_PIPE -  object watchdog_tmp=Stdio.File(); -  watchdog_pipe=watchdog_tmp->pipe(Stdio.PROP_IPC); -  watchdog=Process.create_process( -  backtrace()[0][3] + ({ "--watchdog="+getpid() }), -  (["stdin":watchdog_tmp ])); -  destruct(watchdog_tmp); +  watchdog_tmp = Stdio.File(); +  watchdog_pipe = watchdog_tmp->pipe(Stdio.PROP_IPC); +  add_constant("__signal_watchdog",lambda(){});   #endif -  - #ifdef WATCHDOG_SIGNAL +     watchdog=Process.create_process( -  backtrace()[0][3] + ({ "--watchdog="+getpid() }) ); - #endif +  backtrace()[0][3] + ({ "--watchdog="+getpid() }), +  ([ +  "stdin" :watchdog_tmp || Stdio.stdin, +  "stdout":Stdio.stderr, +  "stderr":Stdio.stderr, +  ])); +  if (watchdog_tmp) destruct(watchdog_tmp);    } -  + #endif + #if defined(WATCHDOG_SIGNAL) && defined(WATCHDOG)    add_constant("__signal_watchdog",signal_watchdog); - #else + #else // WATCHDOG_PIPE or !WATCHDOG    add_constant("__signal_watchdog",lambda(){}); - #endif // else WATCHDOG_PIPE + #endif // WATCHDOG_SIGNAL && WATCHDOG       add_constant("_verbose", verbose);    if(verbose)