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

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Mon, 19 Jul 2010 16:29:51 -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 bonefish):

 Replying to [comment:2 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.

 Maybe I misunderstand what you're saying. waitpid() does not tell you
 whether there are still living children. It does only tell you about
 terminated children. I don't see what this has to do with this ticket,
 though. Isn't this just about checking whether number of tabs > 1 before
 quitting?

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

Other related posts: