> On Sat, 25 Apr 1998, Dave Laplander wrote:
>
> <SNIP>
> > Apr 25 08:05:37 jobe diald[337]: FIFO: full monitor connection to monitor
> > /tmp/dctrl.16116 requested
> >
> > Apr 25 08:05:37 jobe diald[337]: FIFO: could not open pipe
> > /tmp/dctrl.16116: Device not configured
> </SNIP>
>
> I'm getting the following:
>
> FIFO: full monitor connection to monitor /tmp/dctrl.3876 requested
> FIFO: could not open pipe /tmp/dctrl.3876: No such device or address
[snip]
> compiling it, but I'm drawing a blank... BTW, also using diald-0.16 with
> the .5 patch. Diald is started from my /etc/rc.d/rc.local and here's my
> /etc/diald.conf:
There is a problem in the .5 patch: it doesn't incorporate previous patches to
dctrl, so the solution, at the moment, is to get diald-0.16, apply the .4
patch and get dctrl from there.
Or apply the following patch after applying .5
--- diald-0.16/bin/dctrl Tue Jan 28 00:21:42 1997
+++ diald-0.16.new/bin/dctrl Mon Mar 9 16:50:08 1998
@@ -9,6 +9,7 @@
set monfifo ""
set monfd ""
set fifofd ""
+set fifo_counter 0
# strip chart code
proc stripchart {win x y label} {
@@ -40,6 +41,7 @@
# get the new scale
set ns [expr "int($val)"]
if {$val > $ns} { incr ns }
+ if {"$ns" == "0"} { set ns 1}
set r [expr "($s+0.0)/$ns"]
$win scale all 0 $o 1 $r
set s $ns
@@ -51,6 +53,7 @@
set ns [expr "int($fs)"]
if {$fs > $ns} {incr ns}
if {$ns != $s} {
+ if {"$ns" == "0"} { set ns 1}
set r [expr "($s+0.0)/$ns"]
$win scale all 0 $o 1 $r
set s $ns
@@ -171,7 +174,7 @@
proc make_icon {} {
toplevel .dctrlIcon -class DctrlIcon -width 50 -height 50
- canvas .dctrlIcon.canv -width 50 -height 32
+ canvas .dctrlIcon.canv -width 50 -height 33
.dctrlIcon.canv create text 2 2 \
-font -adobe-times-medium-r-*-*-12-*-*-*-*-*-*-* \
-text "Diald" -anchor nw
@@ -210,20 +213,34 @@
# MONITOR_QUEUE 0x0020
#
+proc killFifo {} {
+ global monfifo monfd
+ if {$monfd!=""} {close $monfd}
+ if {$monfifo!=""} {catch {exec rm -f $monfifo}}
+ set monfd ""
+ set monfifo ""
+}
+
proc openFifo {} {
- global fifofd monfifo monfd default_FIFO
+ global fifofd monfifo monfd default_FIFO fifo_counter
# Turn off any previous monitoring
- if {$monfd!=""} {close $monfd}
- if {$monfifo!=""} {catch {exec rm -f $monfifo}}
+ killFifo
# get new monitoring fifo
set fifofd [open $default_FIFO w]
- set monfifo /tmp/dctrl.[pid]
+ #
+ set fifo_counter [expr "$fifo_counter+1"]
+ set monfifo /tmp/dctrl.[pid]-$fifo_counter
+ # If an event comes along that causes a signal, then
+ # it is possible the exec above gets exited BEFORE
+ # it finishes waiting. Nasty stuff.
+ # so, we do a little loop until we can confirm the fifo exists
+ # before we ask diald to deal with it.
catch {exec mkfifo -m 0600 $monfifo}
+ set monfd [open $monfifo r+]
fifoCmd "monitor $monfifo"
- set monfd [open $monfifo r]
fileevent $monfd readable {stateChange}
}
@@ -264,7 +281,12 @@
proc stateChange {} {
global monfd status trans colors gload tload
- set foo [gets $monfd]
+ set error [gets $monfd foo]
+ if ($error=="-1") {
+ # Make sure to clean up if the pipe goes south...
+ killFifo
+ return
+ }
if {$foo=="STATE"} {
set status(fsm) [gets $monfd]
if {$status(fsm)=="CONNECT"} {.message.vis.text delete 0.0 end}
@@ -335,8 +357,8 @@
proc dctrlQuit {} {
global fifofd monfifo fancy_icon
+ killFifo
if {$fifofd!=""} {
- if {$monfifo!=""} {catch {exec rm -f $monfifo}}
catch {flush $fifofd}
}
if {"$fancy_icon" != 0} {
@@ -352,7 +374,7 @@
frame .menu -relief raised -bd 2
pack .menu -side top -fill x -expand 0
-frame .spacer -width 480 -height 0
+frame .spacer -width 500 -height 0
pack .spacer -side top
menubutton .menu.file -text "File" -menu .menu.file.m -underline 0
@@ -600,4 +622,5 @@
load_init
update
+
openFifo
--
Luca Olivetti | Tarifa Plana ya! http://tarifaplana.home.ml.org/
http://www.luca.ddns.org/ | FAQ http://www.luca.ddns.org/ptp-faq.html
----------------------------------------------------------------------------
PGP key on servers - see http://www.pgp.net/pgpnet/
----------------------------------------------------------------------------
Something unpleasant is coming when men are anxious to tell the truth.
-- Benjamin Disraeli
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]