Re: IPC and counters
On Wed, Oct 15, 2008 at 02:01, Simon Wistow [EMAIL PROTECTED] wrote: Child: my ($msg, $sem_id) = get_message(); my $sem = IPC::Semaphore-new($sem_id); if (0 == $sem-op(0, -1, IPC_NOWAIT)) { do_something($message); } # If we're the last then clean up if (EAGAIN == $sem-op(1,-1, IPC_NOWAIT)) { $sem-remove; } Does the module really export no constants for this 0, 1, -1 stuff? It all seems rather error-prone to me. Cheers, -- Philip Newton [EMAIL PROTECTED]
Re: Invitation to connect on LinkedIn
On Wed, Oct 15, 2008 at 11:47:27AM -0300, Ot?vio Fernandes wrote: Sorry, I was importing my gmail contact and I made this mistake. But such reasonable excuses spoil all the substance flinging, ;-) G.
Re: London.pm Dim sum Thursday 1pm: Golden Pagoda
2008/10/14 Léon Brocard [EMAIL PROTECTED]: Chinatown is so full of Chinese restaurants, so let's have another go at Golden Pagoda this ... week. Golden Pagoda 15a Gerrard Street London W1D 6JD Leicester Square Tube Station http://maps.google.co.uk/maps?q=W1D6JD http://www.timeout.com/london/restaurants/reviews/10643.html This is today! Who's coming? Léon
Re: IPC and counters
On Thu, Oct 16, 2008 at 7:36 AM, Philip Newton [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 02:01, Simon Wistow [EMAIL PROTECTED] wrote: Child: my ($msg, $sem_id) = get_message(); my $sem = IPC::Semaphore-new($sem_id); if (0 == $sem-op(0, -1, IPC_NOWAIT)) { do_something($message); } # If we're the last then clean up if (EAGAIN == $sem-op(1,-1, IPC_NOWAIT)) { $sem-remove; } Does the module really export no constants for this 0, 1, -1 stuff? The first arg is the semaphore number, the second is what to do with it: acquire (-1)/release (+1) the semaphore or wait for it to be full (0). http://www.linuxhq.com/guides/LPG/node52.html It all seems rather error-prone to me. Cheers, -- Philip Newton [EMAIL PROTECTED]
FS: 1U machines
I have a collection of 1U rackmounts for disposal. They are HP/Compaq DL360. £50 each, collect from London NW4, or I can deliver at reasonable locations that do not involve going through the London charge zone. Typical config P3 1.4MHz 1280MB RAM 2 * 18.2 GB in RAID1 2 * Ethernet Most of them have Windows installed, apart from a couple that I have dropped Ubuntu HH onto. Here is the output of 'lspci' 00:00.0 Host bridge: Broadcom CNB20HE Host Bridge (rev 23) 00:00.1 Host bridge: Broadcom CNB20HE Host Bridge (rev 01) 00:00.2 Host bridge: Broadcom CNB20HE Host Bridge (rev 01) 00:00.3 Host bridge: Broadcom CNB20HE Host Bridge (rev 01) 00:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27) 00:05.0 System peripheral: Compaq Computer Corporation Integrated Lights Out Controller (rev 01) 00:05.2 System peripheral: Compaq Computer Corporation Integrated Lights Out Processor (rev 01) 00:0f.0 ISA bridge: Broadcom CSB5 South Bridge (rev 92) 00:0f.1 IDE interface: Broadcom CSB5 IDE Controller (rev 92) 00:0f.2 USB Controller: Broadcom OSB4/CSB5 OHCI USB Controller (rev 05) 00:0f.3 Host bridge: Broadcom CSB5 LPC bridge 01:04.0 RAID bus controller: Compaq Computer Corporation Smart Array 5i/532 (rev 01) 01:05.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 Gigabit Ethernet (rev 15) 01:06.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 Gigabit Ethernet (rev 15) There are also some P4 machines, but I have not yet investigated what they are.
Jackie Carter is out of the office.
I will be out of the office starting 16/10/2008 and will not return until 21/10/2008. In my absence please contact Jayne Robinson on 0161 601 3346 or John-Paul Stokes on 0161 601 3343. Many Thanks ** The information contained in this e-mail and any attachments are intended for the named recipient(s) only. It may also be privileged and confidential. If you are not an intended recipient, you must take no action as a result of receiving it, including, but not limited to copying, distributing and amending it. If this communication has been sent to you in error, please contact us immediately and do not show the communication to any other party. Rullion shall have no liability whatsoever in respect of the content of the communication and makes no warranty as to accuracy. Any views or opinions presented are solely those of the author. Viruses:- Although we have taken steps to ensure that this e-mail and attachments are free from viruses, we advise that in keeping with good computing practice, the recipient should ensure they are actually virus free. ** This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk
Dear friend,
Dear friend, i would like to introduce a good company who trades mainly in electornic products. Now the company is under sales promotion,all the products are sold nearly at its cost. They provide the best service to customers,they provide you with original products of good quality,and what is more,the price is a surprising happiness to you! It is realy a good chance for shopping.just grasp the opportunity,Now or never! The web address:www.bj-trade.com
Re: [(really) OT] find IP address of a pppd
On Thursday 16 Oct 2008, Toby Corkindale wrote: On Wed, Oct 15, 2008 at 03:17:05PM +0100, Dirk Koopman wrote: Before someone goes off on one, this is not an FAQ which involves reading about if-up/if-down, you may assume that I have done that and understood it. I have a program (running only on linux 2.6 kernels) which controls one *or* more instances of pppd. Any or all of those pppds could start or stop at any time. Given the process number of the pppd in question, I want to find out (or be notified [this may be a dbus question]) the ip address assigned to the pppd that has just been started. If there is more than one pppd being started (which may happen simultaneously - although that, at least, can be controlled), it is very important to me that I get the IP address that pertains to the pppd that is controlling it. I want to be able to do this from within the program controlling the pppds, preferably without calling any helper programs (eg ifconfig or lsof) or doing any if-up/if-down magic from within pppd. I am presuming that this involves poking around inside /proc and/or /sys. What I can't seem to find is some pathway from the process id to either the correct device name and then another to the ip(v4) address. /var/run/ppp*.pid will give you the mapping between process IDs of pppd and interfaces. (Path might vary between operating systems..) Getting from ppp1 to 192.168.66.6 or whatever could be done on Linux by parsing the output of `ip addr show dev ppp1`, but would vary on other OSs. There must be a CPAN module to do this generically? Toby IO::Interface::Simple or IO::Interface works for me (tested with normal ethernet and loopback interfaces)