bogoserver

martin f krafft madduck at debian.org
Tue Aug 23 13:09:01 UTC 2005


also sprach Fabio Fabbri <fabio at llgp.org> [2005.08.23.1408 +0200]:
> I must admit I didn't know this kind of semaphores. However I think
> solve this kind of problem with semaphores is harder than using monitors
> or message passing. I don't know how to use monitors under bash, so I
> implemented this using message passing through TCP and writing a server
> as a first try.

while [ ! -e/var/run/my_semaphore ]; do sleep 1; done

> Moreover, this kind of server is flexible and can receive messages
> from a service when it's partially started. For example it can
> receive a notification from hotplug or udev when sound card or
> network card is available, then a script that was waiting for
> these devices can be executed without wait for all the execution
> of hotplug.

They could also just create semaphores.

> And last, if deadlock occurs, you can unlock easily sending the right
> message.

... or by creating/removing the right semaphore.

Don't get me wrong, I appreciate your effort. But before we add such
complexity (and TCP *is* complexity), we should know which problems
we are trying to solve therewith, which can't be solved with easier
methods.

> ... or enabling TCP in bash. This is a documented feature of bash
> 2, but it was disabled and the man page reports a feature that is
> not available. I think bash should be recompiled with TCP support,
> otherwise the manual should be modified!

File a bug. I don't think bash will ever get TCP support in Debian.
It's too dangerous.

-- 
 .''`.     martin f. krafft <madduck at debian.org>
: :'  :    proud Debian developer and author: http://debiansystem.info
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP (sub)keys? Use subkeys.pgp.net as keyserver!
 
"der beruf ist eine schutzwehr, hinter welche man sich erlaubterweise
 zurückziehen kann, wenn bedenken und sorgen allgemeiner art einen
 anfallen."
                                                 - friedrich nietzsche
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://lists.alioth.debian.org/pipermail/initscripts-ng-devel/attachments/20050823/b5a5addc/attachment.pgp


More information about the initscripts-ng-devel mailing list