[haiku-bugs] Re: [Haiku] #3745: Preferences : "[x] Warn upon closing active programs"

  • From: "jackburton" <trac@xxxxxxxxxxxx>
  • Date: Mon, 19 Jul 2010 14:51:39 -0000

#3745: Preferences : "[x] Warn upon closing active programs"
------------------------------------+---------------------------------------
  Reporter:  mmadia                 |         Owner:  jackburton   
      Type:  enhancement            |        Status:  new          
  Priority:  normal                 |     Milestone:  R1           
 Component:  Applications/Terminal  |       Version:  R1/pre-alpha1
Resolution:                         |      Keywords:               
Blocked By:                         |   Has a Patch:  0            
  Platform:  All                    |      Blocking:               
------------------------------------+---------------------------------------

Comment (by jackburton):

 In theory "waitpid(-1, &status, WNOHANG)" should tell if a child process
 has exited or not, and thus be used to tell if a program is still running.
 In practice, I've experimented with it a bit, but there seems to be no
 difference in the returned values.
 Maybe since "bash" is already a child process, waitpid() will always
 return that there are still child processes runing.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/3745#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: