NetBSD-Bugs archive

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

Re: bin/48138



The following reply was made to PR bin/48138; it has been noted by GNATS.

From: Steffen Nurpmeso <steffen%sdaoden.eu@localhost>
To: Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: bin/48138
Date: Sat, 05 May 2018 23:53:38 +0200

 Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
  |Thanks for the confirmation - I will close this PR, as I think the
  |actual bug in it is fixed.
 
 I hope this reply will not reopen it.
 I am sorry for the de-facto late reply, it seems i came from
 a somewhat frustrating i386 NetBSD installation session and
 blindly hit reply to the reminder.. (and got surprised to see that
 coming in today anew).
 
  |I suspect (though haven't checked - yet) that the difference
  |between the 145 status you saw, and the 127 I see is because
  |the sh "wait" command has been rewritten (again) in -current
  |(when the -n and -p options were added).
 
 I wondered because i did not really understand the signal number
 i think -- SIGCHLD?
 
  |I need to think on what should happen with wait and stopped
  |processes -- posix simply says it should wait for all known
  |jobs to complete (or all lgiven as args to wait, if any are)
  |Nothing about finding stopped processes, or not waiting for
  |them to finish.
  |
  |Assuming wait des not simply wait for the stopped process to
  |finish, 127 would be the correct status (I think) when a job/procid
  |is given on the command line, as that indicates "not found" and
  |here the process was not found exited - the 145 would indicate
  |to a script that the process exited with a STGSTOP signal (which
  |would be a remarkable feat for it to achieve).
 
 SIGSTOP, are you sure, wasn't that SIGCHLD? ... But with some
 trying i see that No. 1 (bash) acts the very same:
 
   [1]+  Stopped                 sleep 45
   #?0[steffen@essex tmp]$ wait
   #?0[steffen@essex tmp]$ wait %1
   bash: warning: wait_for_job: job 1 is stopped
 
 So desirable to follow, given that nothing better exists.
 
  |Certainly I don't believe that the wait command should (ever)
  |produce jobs style output, and I am not sure bash's warning is
  |a good idea either.
 
 You have been there before.  I do not know, i would say "in
 interactive context, yes".
 
  |But perhaps some other status would be better here, to indicate
  |that the process exists, but isn't running, and hasn't exited.
  |Or perhaps wait should just ... wait (but as you showed in the
  |PR, other shells do not).
  |
  |I think handling this can be deferred for a while though.
  |
  |Incidentally, can you tell me which ksh is /bin/ksh on MacOS
  |
  | /bin/ksh -c 'echo ${KSH_VERSION}'
 
 Oh, what do you think!  Well indeed the old Lion (10.7.5) says:
 
   ?0[sdaoden@devon shared]$ /bin/ksh 'echo ${.sh.version}'
   Version M 1993-12-28 s+
 
 whereas here i have
 
   #?0[steffen@essex tmp]$ echo $KSH_VERSION
   @(#)MIRBSD KSH R56 2018/01/14
 
 A nice weekend i wish.
 
 --steffen
 |
 |Der Kragenbaer,                The moon bear,
 |der holt sich munter           he cheerfully and one by one
 |einen nach dem anderen runter  wa.ks himself off
 |(By Robert Gernhardt)
 



Home | Main Index | Thread Index | Old Index