I must misunderstand something about wait (sh command), but I'm not
sure what: why does wait return 127 for an existing process?

$ PM=31309;kill -HUP $PM; echo $?; ps -p $PM; wait $PM; echo $?; ps -p $PM
0 
  PID TT  STAT        TIME COMMAND
31309 p0  S        0:00.03 ../libpmilter/t-pmilter-1 -r m=550
127
  PID TT  STAT        TIME COMMAND
31309 p0  S        0:00.03 ../libpmilter/t-pmilter-1 -r m=550
$ wait $PM; echo $?
127
$ kill -0 $PM;echo $?
0

(OpenBSD 6.8)

I guess the (multi-threaded) process is in some "weird" state?


PS: it seems I can't attach a debugger either:
$ egdb -p $PM ../libpmilter/t-pmilter-0
GNU gdb (GDB) 7.12.1
...
Reading symbols from ../libpmilter/t-pmilter-0...done.
Attaching to program: /home/ca/sm-9/openbsd-111/libpmilter/t-pmilter-0, process 
31309
ptrace: Operation not permitted.

PPS: the problem is extremely hard to reproduce: running the single
functional test never causes the problem, so far it happens only
if many other tests have been run before (which takes almost 2 hours).

-- 
Address is valid for this mailing list only, please do not reply
to it direcly, but to the list.

Reply via email to