[haiku-bugs] Re: [Haiku] #5263: could not create mutex

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Sun, 25 Apr 2010 13:38:36 -0000

#5263: could not create mutex
---------------------------+------------------------------------------------
 Reporter:  mmadia         |       Owner:  axeld         
     Type:  bug            |      Status:  new           
 Priority:  normal         |   Milestone:  R1            
Component:  System/Kernel  |     Version:  R1/Development
 Keywords:                 |   Blockedby:                
 Platform:  All            |    Blocking:                
---------------------------+------------------------------------------------

Comment(by korli):

 Replying to [comment:5 bonefish]:
 > The fact that one process uses that many semaphores is one problem, but
 this is a different issue. Obviously the bfs_shell process shouldn't stick
 around after the script terminates. Unfortunately with the current
 communication mechanisms (UNIX sockets respectively BeOS ports) the
 bfs_shell cannot know when it is no longer needed and therefore needs to
 be told explicitly. In the explicit "exit" cases that could be done
 easily, but the "set -o errexit" makes it complicated. Maybe it is
 possible to install some generic exit callback -- I know that it is
 possible to install signal callbacks at least.

 Something like this should do the trick
 {{{
 function cleanexit() {
     local exit_status=$?
     echo "Exiting with $exit_status"
     exit $exit_status
 }

 trap cleanexit ERR
 }}}

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

Other related posts: